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

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

Find objects of a given type associated with this Term.
public objects ( $type ) : Array
$type string. The name of the object type for which the associations are wanted.
Результат Array of object ids associated with this term for the given type.
    public function objects($type)
    {
        $type_id = Vocabulary::object_type_id($type);
        $results = DB::get_column("SELECT object_id FROM {object_terms} WHERE term_id = ? AND object_type_id = ?", array($this->id, $type_id));
        return $results;
    }