components/AuthBehavior.php
public function hasParent($itemName, $parentName)
    {
        $parents = $this->getParents($itemName);
        if (in_array($parentName, $parents)) {
            return true;
        }
        return false;
    }
public function hasParent($itemName, $parentName)
    {
        $parents = $this->getParents($itemName);
        if (in_array($parentName, $parents)) {
            return true;
        }
        return false;
    }
public function hasParent ( $ itemName , $ parentName ) { $ parents = $ this -> getParents ( $ itemName ) ; if ( in_array ( $ parentName , $ parents ) ) { return true ; } return false ; }
Returns whether the given item has a specific parent.
@param string $itemName name of the item.
@param string $parentName name of the parent.
@return boolean the result.
Returns whether the given item has a specific parent .