taxonomy_field_info
- Versions
- 7
taxonomy_field_info()
Implements hook_field_info().
Field settings:
- allowed_values: a list array of one or more vocabulary trees:
- vid: a vocabulary ID.
- parent: a term ID of a term whose children are allowed. This should be '0' if all terms in a vocabulary are allowed. The allowed values do not include the parent term.
Code
modules/taxonomy/taxonomy.module, line 964
<?php
function taxonomy_field_info() {
return array(
'taxonomy_term' => array(
'label' => t('Taxonomy term'),
'description' => t('This field stores a reference to a taxonomy term.'),
'default_widget' => 'options_select',
'default_formatter' => 'taxonomy_term_link',
'settings' => array(
'allowed_values' => array(
array(
'vid' => '0',
'parent' => '0',
),
),
),
),
);
}
?>Login or register to post comments 