*/ | */ | ||||
public function buildForm(FormBuilderInterface $builder, array $options) | public function buildForm(FormBuilderInterface $builder, array $options) | ||||
{ | { | ||||
$placeholder = ""; | |||||
if (isset($options['placeholder_description'])) { | |||||
$placeholder = $options['placeholder_description']; | |||||
} | |||||
$builder->add( | $builder->add( | ||||
'description', | 'description', | ||||
TextareaType::class, | TextareaType::class, | ||||
'constraints' => [ | 'constraints' => [ | ||||
new NotBlank(), | new NotBlank(), | ||||
], | ], | ||||
'attr' => [ | |||||
"placeholder" => $placeholder | |||||
] | |||||
] | ] | ||||
); | ); | ||||
if ($options['thematic'] == true) { | if ($options['thematic'] == true) { | ||||
[ | [ | ||||
'data_class' => $this->em->getEntityName(DreamInterface::class), | 'data_class' => $this->em->getEntityName(DreamInterface::class), | ||||
'context' => 'backend', | 'context' => 'backend', | ||||
'thematic' => true | |||||
'thematic' => true, | |||||
'placeholder_description' => false | |||||
] | ] | ||||
); | ); | ||||
} | } |
*/ | */ | ||||
public function buildForm(FormBuilderInterface $builder, array $options) | public function buildForm(FormBuilderInterface $builder, array $options) | ||||
{ | { | ||||
$placeholder = ""; | |||||
if (isset($options['placeholder_description'])) { | |||||
$placeholder = $options['placeholder_description']; | |||||
} | |||||
$builder->add( | $builder->add( | ||||
'description', | 'description', | ||||
TextareaType::class, | TextareaType::class, | ||||
'constraints' => [ | 'constraints' => [ | ||||
new NotBlank(), | new NotBlank(), | ||||
], | ], | ||||
'attr' => [ | |||||
"placeholder" => $placeholder | |||||
] | |||||
] | ] | ||||
); | ); | ||||
[ | [ | ||||
'data_class' => $this->em->getEntityName(ProjectInspiringInterface::class), | 'data_class' => $this->em->getEntityName(ProjectInspiringInterface::class), | ||||
'context' => 'backend', | 'context' => 'backend', | ||||
'thematic' => true | |||||
'thematic' => true, | |||||
'placeholder_description' => false | |||||
] | ] | ||||
); | ); | ||||
} | } |