Nette\Security\Permission::roleInheritsFrom PHP Метод

roleInheritsFrom() публичный Метод

Returns TRUE if $role inherits from $inherit. If $onlyParents is TRUE, then $role must inherit directly from $inherit.
public roleInheritsFrom ( $role, $inherit, $onlyParents = FALSE ) : boolean
Результат boolean
    public function roleInheritsFrom($role, $inherit, $onlyParents = FALSE)
    {
        $this->checkRole($role);
        $this->checkRole($inherit);
        $inherits = isset($this->roles[$role]['parents'][$inherit]);
        if ($inherits || $onlyParents) {
            return $inherits;
        }
        foreach ($this->roles[$role]['parents'] as $parent => $foo) {
            if ($this->roleInheritsFrom($parent, $inherit)) {
                return TRUE;
            }
        }
        return FALSE;
    }