get(NewsContainer::class)->getRepositoryQuery(); } public function configureFields(string $pageName): iterable { $panel = parent::configureFields($pageName); return array_merge( [ FormField::addPanel('general'), TextField::new('title'), DateField::new('date') ->setFormat('d/MM/y'), NumberField::new('position') ->hideOnIndex() ->hideOnForm(), CKEditorField::new('description'), StatusField::new('status'), ], $panel ); } public function createEntity(string $entityFqcn) { return $this->get(NewsContainer::class)->getFactory()->create(); } }