function show_title_entity_extra_field_info in Show title 2.0.x
Same name and namespace in other branches
- 8 show_title.module \show_title_entity_extra_field_info()
Implements hook_entity_extra_field_info().
File
- ./
show_title.module, line 43 - Module Show Title.
Code
function show_title_entity_extra_field_info() {
$extra = [];
// Nodes.
foreach (NodeType::loadMultiple() as $bundle) {
$extra['node'][$bundle
->id()]['display']['show_title'] = [
'label' => t('Title'),
'description' => t('Show Title'),
'weight' => 100,
'visible' => TRUE,
];
}
// Taxonomy terms.
foreach (Vocabulary::loadMultiple() as $vocabulary) {
$extra['taxonomy_term'][$vocabulary
->id()]['display']['show_title'] = [
'label' => t('Name'),
'description' => t('Show Name'),
'weight' => 100,
'visible' => TRUE,
];
}
return $extra;
}