Habari\Vocabulary::get_all_object_terms PHP Метод

get_all_object_terms() публичный статический Метод

For example, return all terms associated with a particular post, from all vocabularies.
public static get_all_object_terms ( $object_type, $id ) : array
Результат array Array of Vocabulary names
    public static function get_all_object_terms($object_type, $id)
    {
        $query = Query::create('{terms}')->select('id', 'term', 'term_display', 'vocabulary_id', 'mptt_left', 'mptt_right');
        $query->join('JOIN {object_terms} ON {terms}.id = {object_terms}.term_id', array(), 'object_terms');
        $query->where()->in('{object_terms}.object_type_id', self::object_type_id($object_type));
        $query->where()->in('{object_terms}.object_id', $id);
        return new Terms($query->results('Term'));
    }