CMS  Version 3.9
TaxonomyTerm Class Reference

Inherits DataItem.

Public Member Functions

 Taxonomy ()
 
 getAssociatedItems ($class, $constraint="")
 

Public Attributes

 $table = "taxonomy_term"
 
 $primary_key = "term_id"
 
 $cacheLocal = true
 
 $fields
 
 $relations = array("Taxonomy" => Taxonomy)
 

Detailed Description

Definition at line 39 of file taxonomy_term.inc.

Member Function Documentation

◆ getAssociatedItems()

TaxonomyTerm::getAssociatedItems (   $class,
  $constraint = "" 
)

Definition at line 58 of file taxonomy_term.inc.

59  {
60  $constraint = preg_replace("/^\\s*WHERE/i", "AND", $constraint);
61  $obj = new $class;
62  $pk = $obj->getPrimaryKey();
63 
64  $items = Query::create($class, "WHERE $pk IN (SELECT id FROM taxonomy_term_association WHERE term_id=:term_id AND class=:cl) $constraint")
65  ->bind(":term_id", $this->term_id,
66  ":cl", $class)
67  ->execute();
68 
69  return $items;
70  }
$constraint

◆ Taxonomy()

TaxonomyTerm::Taxonomy ( )

Definition at line 53 of file taxonomy_term.inc.

54  {
55  return $this->getRelated(Taxonomy);
56  }

Member Data Documentation

◆ $cacheLocal

TaxonomyTerm::$cacheLocal = true

Definition at line 43 of file taxonomy_term.inc.

◆ $fields

TaxonomyTerm::$fields
Initial value:
= array("term_id" => Number,
"taxonomy_id" => Number,
"term" => String,
"definition" => HTML,
"sort_order" => Number)

Definition at line 45 of file taxonomy_term.inc.

◆ $primary_key

TaxonomyTerm::$primary_key = "term_id"

Definition at line 42 of file taxonomy_term.inc.

◆ $relations

TaxonomyTerm::$relations = array("Taxonomy" => Taxonomy)

Definition at line 51 of file taxonomy_term.inc.

◆ $table

TaxonomyTerm::$table = "taxonomy_term"

Definition at line 41 of file taxonomy_term.inc.


The documentation for this class was generated from the following file: