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) { return $this->get(SectionContainer::class) ->getFactory() ->create($this->get(MerchantResolver::class)->getCurrent()); } }