Sending data from controller to form builder in Symfony

Sending data from controller to form builder in symfony:

Controller

namespace App\Controller;

use App\Entity\Yami;
use App\Form\YamiType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
 * @Route("/yamicode")
*/
class YamiController extends Controller
{
	/**
     * @Route("/new", name="yami_new", methods="GET|POST")
     */
    public function new(Request $request): Response
    {
    	$yami = new Yami();
        $form = $this->createForm(YamiType::class, $yami, array('is_new'=>false));
        // rest of the code
    }
}

AbstractType form

namespace App\Form;

use App\Entity\Yami;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class YamiType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
    	$isNew = $options['is_new'];
        //rest of the code
    }

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'data_class' => Yami::class,
            // default value
            'is_new' => true
        ]);
    }
}