TreeBehavior::ancestorOfIds PHP Method

ancestorOfIds() public method

returns true if the owner is an ancestor of any of the ids passed in.
public ancestorOfIds ( $ids )
    public function ancestorOfIds($ids)
    {
        $owner = $this->getOwner();
        $descendents = $owner->descendentIds();
        return count(array_intersect($ids, $descendents)) > 0;
    }