src/Role.php
public function getPermissions()
    {
        $mode     = \RecursiveIteratorIterator::CHILD_FIRST;
        $iterator = $this->createRecursiveIterator($mode);

        $permissions = [];

        /** @var $child RoleInterface */
        foreach ($iterator as $child) {
            $permissions = array_replace_recursive($permissions, $child->getPermissions());
        }

        return array_replace_recursive($permissions, $this->permissions);
    }
public function getPermissions()
    {
        $mode     = \RecursiveIteratorIterator::CHILD_FIRST;
        $iterator = $this->createRecursiveIterator($mode);

        $permissions = [];

        /** @var $child RoleInterface */
        foreach ($iterator as $child) {
            $permissions = array_replace_recursive($permissions, $child->getPermissions());
        }

        return array_replace_recursive($permissions, $this->permissions);
    }
public function getPermissions ( ) { $ mode = \ RecursiveIteratorIterator :: CHILD_FIRST ; $ iterator = $ this -> createRecursiveIterator ( $ mode ) ; $ permissions = [ ] ; /** @var $child RoleInterface */ foreach ( $ iterator as $ child ) { $ permissions = array_replace_recursive ( $ permissions , $ child -> getPermissions ( ) ) ; } return array_replace_recursive ( $ permissions , $ this -> permissions ) ; }
Returns permissions from the Role.

@return PermissionInterface[]
Returns permissions from the Role .