1 node_test.module node_test_entity_view_mode_alter(&$view_mode, $context)

Implements hook_entity_view_mode_alter().

File

core/modules/node/tests/node_test/node_test.module, line 159
A dummy module for testing node related hooks.

Code

function node_test_entity_view_mode_alter(&$view_mode, $context) {
  // Only alter the display mode if we are on the test callback.
  if ($change_view_mode = state_get('node_test_change_view_mode', '')) {
    $view_mode = $change_view_mode;
  }
}