{@inheritDoc}
@see \Ness\Component\User\Role\RoleHierarchyInterface::getRoles()
767992
public function getRoles(string $role): array
    {
        if(!\in_array($role, $this->roles))
            throw new UndefinedRoleException("This role '{$role}' is not registered into RoleHierarchy");
        
        return isset($this->map[$role]) ? \array_merge([], [$role], $this->map[$role]) : [$role];
    }
666341
public function resolve(array $roles): array
    {
        $resolvedRoles = array_unique($this->resolveRoleHierarchy($roles));
        sort($resolvedRoles);

        $this->logger->info(
            'security.authorization.rolehierarchyresolver: resolved roles {resolvedRoles} by given roles {roles}',
            ['resolvedRoles' => implode(', ', $resolvedRoles), 'roles' => implode(', ', $roles)]
        );

        return $resolvedRoles;
    }
439778
public function getExplicitRoles()
    {
        $manager = \FelixOnline\Core\BaseManager::build('FelixOnline\Core\UserRole', 'user_roles', 'id');
        $manager->filter('user = "%s"', array($this->getUser()));

        $values = $manager->values();
        if (!$values) {
            return null;
        }

        $roles = array();
        foreach ($values as $value) {
            $roles[] = $value->getRole();
        }

        return $roles;
    }
577817
public function getByRoles(array $rolesIds)
    {
        return $this->model->whereHas('roles', function ($query) use ($rolesIds) {
            $query->whereIn('id', $rolesIds);
        })->get();
    }
104354
public function getRoles($includeAbstract = false)
    {
        $this->initialize();
        if (!$includeAbstract) {
            return array_filter($this->roles, function (Role $role) {
                return $role->isAbstract() !== true;
            });
        }
        return $this->roles;
    }
661031
protected function getHierarchy($role, array $roleHierarchy)
    {
        $roles = [];
        if (array_key_exists($role, $roleHierarchy)) {
            $roleRoles = (array) $roleHierarchy[$role];
            foreach ($roleRoles as $role) {
                $roles = array_merge($roles, $this->getHierarchy($role, $roleHierarchy));
            }
            $roles = array_merge($roles, $roleRoles);
        }

        return $roles;
    }
563357
public function getAllIncludedRoles (array $roles)
    {
        $allIncludedRoles = [];
        foreach ($this->normalizeRoleList($roles) as $role)
        {
            $includedRoleCollection = [];
            $this->findIncludedRoles($role, $includedRoleCollection);
            $allIncludedRoles = array_replace($allIncludedRoles, $includedRoleCollection);

            $includedActionCollection = [];
            $this->findIncludedActions($role, $includedActionCollection);
            $allIncludedRoles = array_replace($allIncludedRoles, $includedActionCollection);
        }

        return $allIncludedRoles;
    }
373819
public function getRoles()
    {
        $roles = $this->roles;

        foreach ($this->getGroups() as $group) {
            /** @noinspection SlowArrayOperationsInLoopInspection */
            $roles = array_merge($roles, $group->getRoles());
        }

        // we need to make sure to have at least one role
        $roles[] = static::ROLE_DEFAULT;

        return array_unique($roles);
    }
1045885
public function getAllRoleIds()
    {
        $ids = array();
        foreach ($this->getAllRoles() as $role) {
            $ids[] = $role->getId();
        }
        return $ids;
    }
885436
public function getRoles()
    {
        if (count($this->rolesStringAsArray) > 0) {
            return $this->rolesStringAsArray;
        }

        $roleNames = array();

        foreach ($this->getEntityRoles(true) as $role) {
            $roleNames[] = $role->getName();
        }

        return $roleNames;
    }
348030
public function getRoles($areGroupsIncluded = true)
    {
        $roleNames = parent::getRoles();

        if ($areGroupsIncluded) {
            foreach ($this->getGroups() as $group) {
                $roleNames = array_unique(array_merge($roleNames, $group->getRoles()));
            }
        }

        return $roleNames;
    }
926936
public function getRoleDefinitions()
    {
        if(!$this->isPropertyAvailable('RoleDefinitions')){
            $this->setProperty("RoleDefinitions", new RoleDefinitionCollection($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(),"roledefinitions")));
        }
        return $this->getProperty("RoleDefinitions");
    }
590365
protected function getRoleIdsFromNames(array $names)
    {
        $key = Models::role()->getKeyName();

        return Models::role()
                     ->whereIn('name', $names)
                     ->get([$key])
                     ->pluck($key);
    }
1002302
public function getRoleKeys($roles)
    {
        $roles = Helpers::groupModelsAndIdentifiersByType($roles);

        $roles['strings'] = $this->getKeysByName($roles['strings']);

        $roles['models'] = Arr::pluck($roles['models'], $this->getKeyName());

        return Arr::collapse($roles);
    }
801179
public function getterRoleConstants(): array
	{
		$result = [];
		$roles = $this->roles->get();
		/* @var $role AclRole */
		foreach ($roles as $role) {
			$result[] = $role->name;
		}
		return $result;
	}
381048
public function getRolesAttribute()
    {
        $roles = new Collection();

        foreach ($this->guild->roles as $role) {
            if (array_search($role->id, $this->attributes['roles']) !== false) {
                $roles->push($role);
            }
        }

        return $roles;
    }
6019
public function roles()
    {
        $user   = $this->user();
        $userId = 0;
        is_null($user) || $userId = $user->getAuthIdentifier();
        $roles  = Arr::get($this->userRoles, "{$userId}", []);
        if (empty($roles)) {
            $roles = $this->getUserRolesFromEventDispatcher($user, $roles);
        }

        Arr::set($this->userRoles, "{$userId}", $roles);

        return $roles;
    }