function biblio_contributor_categories in Bibliography Module 7.2
6 calls to biblio_contributor_categories()
- biblio_contributor_biblio_form in ./
biblio.module - Set up the form for ONE contributor in the biblio add/edit form.
- biblio_contributor_widget in ./
biblio.module - Get form structure for the multivalued add contributor widget
- biblio_create_contributor_refs in ./
biblio.module - Creates contributor reference fields based on user-entered contributor names and categories. Also creates Contributor entities for those contributors that don't already exist.
- biblio_create_imported_contributors in includes/
biblio.import.export.inc - biblio_get_contributors in includes/
biblio.contributors.inc - Extracts Contributor data from a Biblio entity and lists contributors together in an array.
File
- includes/
biblio.contributors.inc, line 470
Code
function biblio_contributor_categories($publication_type = NULL) {
$categories = array(
'primary' => array(
'label' => t('Primary Contributors'),
'field' => 'biblio_primary_contributors',
),
'secondary' => array(
'label' => t('Secondary Contributors'),
'field' => 'biblio_secondary_contributors',
),
'tertiary' => array(
'label' => t('Tertiary Contributors'),
'field' => 'biblio_tertiary_contributors',
),
'subsidiary' => array(
'label' => t('Subsidiary Contributors'),
'field' => 'biblio_subsidiary_contributors',
),
'corporate' => array(
'label' => t('Corporate/Institutional Contributors'),
'field' => 'biblio_corporate_contributors',
),
);
if ($publication_type) {
$instances = field_info_instances('biblio', $publication_type);
foreach ($categories as $category => $info) {
if (isset($instances[$info['field']])) {
$categories[$category]['label'] = $instances[$info['field']]['label'];
}
}
}
return $categories;
}