|
static | formatAssociatedTerms ($taxonomy_identifier, $obj, $separator=", ") |
| Given a taxonomy identifier and an obj, return the associated terms. More...
|
|
static | decorate ($item, $separator=", ") |
| Decorates the target DataItem with all the associated taxonomy terms. More...
|
|
Definition at line 39 of file taxonomy_helper.inc.
◆ decorate()
static TaxonomyHelper::decorate |
( |
|
$item, |
|
|
|
$separator = ", " |
|
) |
| |
|
static |
Decorates the target DataItem with all the associated taxonomy terms.
- Parameters
-
DataItem | $item | the target DataItem |
string | $separator | the separator to use when formatting multiple taxonomy terms |
Definition at line 64 of file taxonomy_helper.inc.
static formatAssociatedTerms($taxonomy_identifier, $obj, $separator=", ")
Given a taxonomy identifier and an obj, return the associated terms.
static getAssociatedTaxonomies($classes, $facet_filter_only=false)
◆ formatAssociatedTerms()
static TaxonomyHelper::formatAssociatedTerms |
( |
|
$taxonomy_identifier, |
|
|
|
$obj, |
|
|
|
$separator = ", " |
|
) |
| |
|
static |
Given a taxonomy identifier and an obj, return the associated terms.
- Parameters
-
String | $taxonomy_identifier | |
obj | $obj | DataItem object associated with the taxonomy |
- Returns
- string
Definition at line 48 of file taxonomy_helper.inc.
52 $terms = Query::create(
TaxonomyTerm,
"WHERE term_id IN (SELECT term_id FROM taxonomy_term_association WHERE class=:class AND id=:obj_id AND taxonomy_id IN (SELECT taxonomy_id FROM taxonomy WHERE identifier=:identifier)) AND taxonomy_id IN (SELECT taxonomy_id FROM taxonomy WHERE identifier=:identifier) ORDER BY term")
53 ->bind(
":class", get_class(
$obj),
":obj_id",
$obj->get(
$pk),
":identifier", $taxonomy_identifier)
56 return formatItems(
$terms,
"{term}", $separator);
The documentation for this class was generated from the following file: