setRequired(true) ->hideOnIndex() ->setChoices( [ 'Jour' => SectionModel::CYCLE_TYPE_DAY, 'Semaine' => SectionModel::CYCLE_TYPE_WEEK, 'Mois' => SectionModel::CYCLE_TYPE_MONTH, 'Année' => SectionModel::CYCLE_TYPE_YEAR, ] ), TextField::new('color') ->setRequired(true), NumberField::new('position') ->hideOnForm() ->hideOnIndex(), CKEditorField::new('description') ->hideOnIndex(), BooleanField::new('isDefault'), BooleanField::new('isCommon'), StatusField::new('status'), ], $this->getSeoPanel(), $this->getConfPanel(), ); } public function createEntity(string $entityFqcn) { return $this->get(SectionContainer::class) ->getFactory() ->create($this->get(MerchantResolver::class)->getCurrent()); } }