. */ namespace App\Form\AdminPages; use App\Entity\Base\AbstractNamedDBElement; use App\Form\ProjectSystem\ProjectBOMEntryCollectionType; use App\Form\ProjectSystem\ProjectBOMEntryType; use App\Form\Type\RichTextEditorType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\CollectionType; use Symfony\Component\Form\FormBuilderInterface; class ProjectAdminForm extends BaseEntityAdminForm { protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void { $builder->add('description', RichTextEditorType::class, [ 'required' => false, 'label' => 'part.edit.description', 'mode' => 'markdown-single_line', 'empty_data' => '', 'attr' => [ 'placeholder' => 'part.edit.description.placeholder', 'rows' => 2, ], ]); $builder->add('bom_entries', ProjectBOMEntryCollectionType::class); $builder->add('status', ChoiceType::class, [ 'attr' => [ 'class' => 'form-select', ], 'label' => 'project.edit.status', 'required' => false, 'empty_data' => '', 'choices' => [ 'project.status.draft' => 'draft', 'project.status.planning' => 'planning', 'project.status.in_production' => 'in_production', 'project.status.finished' => 'finished', 'project.status.archived' => 'archived', ], ]); } }