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) { $factory = new UserFactory(); return $factory->create(); } }