src/Roles/RoleLock.php
public function getInheritedRolePermissions(Role $role)
    {
        $permissions = $this->getPermissionsForRole($role);

        if ($inheritedRole = $role->getInheritedRole()) {
            if ($inheritedRole = $this->manager->convertRoleToObject($inheritedRole)) {
                $permissions = array_merge($permissions, $this->getInheritedRolePermissions($inheritedRole));
            }
        }

        return $permissions;
    }
public function getInheritedRolePermissions(Role $role)
    {
        $permissions = $this->getPermissionsForRole($role);

        if ($inheritedRole = $role->getInheritedRole()) {
            if ($inheritedRole = $this->manager->convertRoleToObject($inheritedRole)) {
                $permissions = array_merge($permissions, $this->getInheritedRolePermissions($inheritedRole));
            }
        }

        return $permissions;
    }
public function getInheritedRolePermissions ( Role $ role ) { $ permissions = $ this -> getPermissionsForRole ( $ role ) ; if ( $ inheritedRole = $ role -> getInheritedRole ( ) ) { if ( $ inheritedRole = $ this -> manager -> convertRoleToObject ( $ inheritedRole ) ) { $ permissions = array_merge ( $ permissions , $ this -> getInheritedRolePermissions ( $ inheritedRole ) ) ; } } return $ permissions ; }
Returns all the permissions for a role and their inherited roles

@param \BeatSwitch\Lock\Roles\Role $role
@return \BeatSwitch\Lock\Permissions\Permission[]
Returns all the permissions for a role and their inherited roles