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

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

Test a Term's lineage.
public is_descendant_of ( Term $term ) : boolean
$term Term
Результат boolean true if $term is an ancestor of $this
    public function is_descendant_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;
    }