taxonomy_term_reference.inc in Reference Table Formatter 7
File
plugins/reference_types/taxonomy_term_reference.inc
View source
<?php
$plugin = array(
'handler' => array(
'class' => 'reference_table_formatter_taxonomy_term_reference',
),
);
class reference_table_formatter_taxonomy_term_reference extends reference_table_formatter_base_type {
public function get_bundles() {
$bundles = array();
foreach ($this->field['settings']['allowed_values'] as $allowed_values) {
$bundles[] = $allowed_values['vocabulary'];
}
return $bundles;
}
public function entity_name() {
return 'taxonomy_term';
}
function renderable_properties() {
return array(
'name',
);
}
function load_entity_from_item($item) {
return taxonomy_term_load($item['tid']);
}
}