setRequired(true) ->hideOnIndex() ->setChoices( [ 'Jour' => SectionModel::CYCLE_DAY, 'Semaine' => SectionModel::CYCLE_WEEK, 'Mois' => SectionModel::CYCLE_MONTH, 'Année' => SectionModel::CYCLE_YEAR, ] ), TextField::new('color') ->setRequired(true) ->hideOnIndex(), NumberField::new('position') ->hideOnForm() ->hideOnIndex(), CKEditorField::new('description') ->hideOnIndex(), BooleanField::new('isDefault', 'Section par défaut'), StatusField::new('status'), ], $this->getSeoPanel(), $this->getConfPanel(), ); } public function createEntity(string $entityFqcn) { $factory = new SectionFactory(); $currentMerchant = $this->get('merchant_resolver')->getCurrent(); return $factory->create($currentMerchant); } }