add( 'title', TextBlockType::class, [ 'label' => 'Titre', 'options' => [ 'required' => true, 'attr' => [ ], 'constraints' => [ ], ], ] ); $builder->add( 'content', TextareaBlockType::class, [ 'label' => 'Content', 'options' => [ 'attr' => [ 'data-tinymce' => '', 'rows' => '18', ], 'constraints' => [ ], ], ] ); $builder->add( 'image', ImageBlockType::class, [ 'label' => 'Image', 'options' => [ 'attr' => [ ], 'constraints' => [ ], ], ] ); } public function setTitle(Block $block) { return $this->setBlock($block); } public function getTitle() { return $this->getBlock('title'); } public function setContent(Block $block) { return $this->setBlock($block); } public function getContent() { return $this->getBlock('content'); } public function setImage(Block $block) { return $this->setBlock($block); } public function getImage() { return $this->getBlock('image', FileBlock::class); } }