rolesDefinition = $rolesDefinition; } public function configureFields(string $pageName): iterable { return [ EmailField::new('email'), TextField::new('lastname'), TextField::new('firstname'), ChoiceField::new('roles') ->allowMultipleChoices() ->autocomplete() ->setChoices($this->rolesDefinition->getRolesList()) ]; } public function createEntity(string $entityFqcn) { return $this->get(UserContainer::class)->getFactory()->create(); } }