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

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

Find this Term's ancestors.
public ancestors ( ) : Array
Результат Array Direct ancestors from the root to this Term in descendant order.
    public function ancestors()
    {
        $params = array('vocab_id' => $this->vocabulary_id, 'left' => $this->mptt_left, 'right' => $this->mptt_right);
        $query = 'SELECT * FROM {terms} WHERE vocabulary_id=:vocab_id AND mptt_left<:left AND mptt_right>:right ORDER BY mptt_left ASC';
        return DB::get_results($query, $params, 'Term');
    }