1 node_example.module node_example_entity_info_alter(&$entity_info)

Implements hook_entity_info_alter().

We need to modify the default node entity info by adding a new view mode to be used in functions like node_view() or node_build_content().

Related topics


modules/examples/node_example/node_example.module, line 172
Module file for Node Example module.


function node_example_entity_info_alter(&$entity_info) {
  // Add our new view mode to the list of view modes...
  $entity_info['node']['view modes']['example_node_list'] = array(
    'label' => t('Example Node List'),
    'custom settings' => TRUE,