function toc_js_entity_extra_field_info in Toc.js 8
Same name and namespace in other branches
- 2.0.x toc_js.module \toc_js_entity_extra_field_info()
Implements hook_entity_extra_field_info().
File
- ./
toc_js.module, line 79 - Contains toc_js.module.
Code
function toc_js_entity_extra_field_info() {
$extra = [];
/** @var \Drupal\node\Entity\NodeType $bundle */
foreach (NodeType::loadMultiple() as $bundle) {
if ($bundle
->getThirdPartySetting('toc_js', 'toc_js_active', 0)) {
$extra['node'][$bundle
->Id()]['display']['toc_js'] = [
'label' => t('Toc'),
'description' => t('Table of content of node generated with Toc.js'),
'weight' => 100,
'visible' => FALSE,
];
}
}
return $extra;
}