components/AuthBehavior.php
public function hasAncestor($itemName, $ancestorName)
    {
        $ancestors = $this->getAncestors($itemName);
        return isset($ancestors[$ancestorName]);
    }
public function hasAncestor($itemName, $ancestorName)
    {
        $ancestors = $this->getAncestors($itemName);
        return isset($ancestors[$ancestorName]);
    }
public function hasAncestor ( $ itemName , $ ancestorName ) { $ ancestors = $ this -> getAncestors ( $ itemName ) ; return isset ( $ ancestors [ $ ancestorName ] ) ; }
Returns whether the given item has a specific ancestor.
@param string $itemName name of the item.
@param string $ancestorName name of the ancestor.
@return boolean the result.
Returns whether the given item has a specific ancestor .