CodeExplorer getAdminRole example
private function persistUser(User
$user): void
{ $em =
$this->container->
get(ModelManager::
class);
$em->
persist($user);
$em->
flush($user);
} private function createAdminUser(): User
{ $adminRole =
$this->
getAdminRole();
$user =
new User();
$user->
setRoleId($adminRole->
getId());
$user->
setRole($adminRole);
return $user;
} private function validateInput(InputInterface
$input): void
{ $option =
$input->
getOption('email'
);