Habari\Term::is_ancestor_of PHP Метод

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

Test a Term's ancestry
public is_ancestor_of ( Term $term ) : boolean
$term Term
Результат boolean true if $term is a descendant of $this
    public function is_ancestor_of(Term $term)
    {
        if ($this->vocabulary_id != $term->vocabulary_id) {
            return false;
        }
        if ($this->mptt_left < $term->mptt_left && $this->mptt_right > $term->mptt_right) {
            return true;
        }
        return false;
    }