function toc_node_node_view in TOC Node 8
File
- ./
toc_node.module, line 335 - This is the main module file for TOC Node.
Code
function toc_node_node_view(array &$build, \Drupal\Core\Entity\EntityInterface $entity, \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display, $view_mode) {
// Only do the extra work if the component is configured to be displayed.
// This assumes a 'mymodule_addition' extra field has been defined for the
// entity bundle in hook_entity_extra_field_info().
// if ($display->getComponent('mymodule_addition')) {
// $build['mymodule_addition'] = array(
// '#markup' => mymodule_addition($entity),
// '#theme' => 'mymodule_my_additional_field',
// );
// }
}