Neos\Flow\Security\Account::initializeRoles PHP Метод

initializeRoles() защищенный Метод

Initializes the roles field by fetching the role objects referenced by the roleIdentifiers
protected initializeRoles ( ) : void
Результат void
    protected function initializeRoles()
    {
        if ($this->roles !== null) {
            return;
        }
        $this->roles = [];
        foreach ($this->roleIdentifiers as $key => $roleIdentifier) {
            // check for and clean up roles no longer available
            if ($this->policyService->hasRole($roleIdentifier)) {
                $this->roles[$roleIdentifier] = $this->policyService->getRole($roleIdentifier);
            } else {
                unset($this->roleIdentifiers[$key]);
            }
        }
    }