taxonomy_entity_info()Implements hook_entity_info().
modules/taxonomy/taxonomy.module, line 83
<?php
function taxonomy_entity_info() {
$return = array(
'taxonomy_term' => array(
'label' => t('Taxonomy term'),
'controller class' => 'TaxonomyTermController',
'base table' => 'taxonomy_term_data',
'uri callback' => 'taxonomy_term_uri',
'fieldable' => TRUE,
'object keys' => array(
'id' => 'tid',
'bundle' => 'vocabulary_machine_name',
),
'bundle keys' => array(
'bundle' => 'machine_name',
),
'bundles' => array(),
'view modes' => array(
// @todo View mode for display as a field (when attached to nodes etc).
'full' => array(
'label' => t('Taxonomy term page'),
),
),
),
);
foreach (taxonomy_vocabulary_get_names() as $machine_name => $vocabulary) {
$return['taxonomy_term']['bundles'][$machine_name] = array(
'label' => $vocabulary->name,
'admin' => array(
'path' => 'admin/structure/taxonomy/%taxonomy_vocabulary',
'real path' => 'admin/structure/taxonomy/' . $vocabulary->vid,
'bundle argument' => 3,
'access arguments' => array('administer taxonomy'),
),
);
}
$return['taxonomy_vocabulary'] = array(
'label' => t('Taxonomy vocabulary'),
'controller class' => 'TaxonomyVocabularyController',
'base table' => 'taxonomy_vocabulary',
'object keys' => array(
'id' => 'vid',
),
'fieldable' => FALSE,
);
return $return;
}
?>