function organigrams_field_extra_fields in Organigrams 7
Implements hook_field_extra_fields().
File
- ./
organigrams.module, line 447 - Defines the organigrams functions and entity types.
Code
function organigrams_field_extra_fields() {
$return = array();
$info = entity_get_info('organigrams');
foreach (array_keys($info['bundles']) as $bundle) {
$return['organigrams'] = array(
$bundle => array(
// Add the entity fields to the fields UI so the user can change the
// order.
'form' => array(
'name' => array(
'label' => t('Name'),
'description' => t('Text'),
'weight' => -6,
),
'description' => array(
'label' => t('Description'),
'description' => t('Long text'),
'weight' => -5,
),
'status' => array(
'label' => t('Published'),
'description' => t('Checkbox'),
'weight' => -4,
),
'organigram_settings' => array(
'label' => t('Organigram settings'),
'description' => t('Fieldgroup'),
'weight' => -3,
),
'item_settings' => array(
'label' => t('Organigram item settings'),
'description' => t('Fieldgroup'),
'weight' => -2,
),
'font_settings' => array(
'label' => t('Organigram font settings'),
'description' => t('Fieldgroup'),
'weight' => -1,
),
),
// Add the entity fields which eventually will be displayed to the view
// modes so the user can change the order and optionally hide them.
'display' => array(
'name' => array(
'label' => t('Name'),
'weight' => -5,
),
'description' => array(
'label' => t('Description'),
'weight' => -4,
),
'organigram' => array(
'label' => t('Organigram'),
'weight' => -3,
),
),
),
);
}
return $return;
}