Inherits DataItem.
Definition at line 39 of file taxonomy.inc.
◆ Associations()
Taxonomy::Associations |
( |
|
$constraint = "" | ) |
|
◆ countTerms()
Definition at line 82 of file taxonomy.inc.
84 return Query::create(
TaxonomyTerm,
"WHERE taxonomy_id=:taxonomy")
85 ->bind(
":taxonomy", $this->taxonomy_id)
86 ->executeValue(
"COUNT(1)");
◆ fromIdentifier()
static Taxonomy::fromIdentifier |
( |
|
$identifier | ) |
|
|
static |
◆ getAssociatedItems()
Taxonomy::getAssociatedItems |
( |
|
$class | ) |
|
Definition at line 89 of file taxonomy.inc.
92 $pk = $item->getPrimaryKey();
94 return Query::create(
$class,
"WHERE $pk in (SELECT id FROM taxonomy_term_association WHERE taxonomy_id=:t AND class=:c)")
95 ->bind(
":t", $this->taxonomy_id,
◆ getAssociatedTermIds()
Taxonomy::getAssociatedTermIds |
( |
|
$item | ) |
|
Definition at line 109 of file taxonomy.inc.
111 $cl = get_class($item);
113 if (!isset($this->_termCache[
$cl]))
116 ->bind(
":t", $this->taxonomy_id,
117 ":c", get_class($item))
121 return $this->_termCache[
$cl][$item->get($item->getPrimaryKey())]->term_ids;
◆ getAssociatedTerms()
Taxonomy::getAssociatedTerms |
( |
|
$item | ) |
|
Definition at line 100 of file taxonomy.inc.
102 return Query::create(
TaxonomyTerm,
"WHERE term_id IN (SELECT term_id FROM taxonomy_term_association where taxonomy_id=:t and class=:c and id=:i)")
103 ->bind(
":t", $this->taxonomy_id,
104 ":c", get_class($item),
105 ":i", $item->get($item->getPrimaryKey()))
◆ getAssociatedTermsByClass()
Taxonomy::getAssociatedTermsByClass |
( |
|
$class | ) |
|
Definition at line 124 of file taxonomy.inc.
126 return Query::create(
TaxonomyTerm,
"WHERE term_id in (SELECT term_id FROM taxonomy_term_association where taxonomy_id=:id AND class=:cl) ORDER BY sort_order, term")
127 ->bind(
":id", $this->taxonomy_id,
":cl",
$class)
◆ getTerm()
Taxonomy::getTerm |
( |
|
$term | ) |
|
Definition at line 74 of file taxonomy.inc.
76 return Query::create(
TaxonomyTerm,
"WHERE taxonomy_id=:taxonomy AND term=:term")
77 ->bind(
":taxonomy", $this->taxonomy_id,
◆ Terms()
Taxonomy::Terms |
( |
|
$constraint = "" | ) |
|
◆ $_termCache
Taxonomy::$_termCache = array() |
◆ $cacheLocal
Taxonomy::$cacheLocal = true |
◆ $fields
Initial value:= array("taxonomy_id" => Number,
"identifier" => String,
"taxonomy_name" => String,
"description" => HTML,
"associated_classes" => String,
"published" => Boolean,
"enable_facet_filter" => Boolean)
Definition at line 47 of file taxonomy.inc.
◆ $primary_key
Taxonomy::$primary_key = "taxonomy_id" |
◆ $relations
Taxonomy::$relations = array("Terms" => TaxonomyTerm) |
◆ $table
Taxonomy::$table = "taxonomy" |
The documentation for this class was generated from the following file:
- C:/code/cms.sonjara.com/cms/components/taxonomy/datamodel/taxonomy.inc