function node_test_entity_view_mode_alter

cis7 node_test.module node_test_entity_view_mode_alter(&$view_mode, $context)
cle7 node_test.module node_test_entity_view_mode_alter(&$view_mode, $context)
elmsmedia7 node_test.module node_test_entity_view_mode_alter(&$view_mode, $context)
icor7 node_test.module node_test_entity_view_mode_alter(&$view_mode, $context)
meedjum_blog7 node_test.module node_test_entity_view_mode_alter(&$view_mode, $context)
mooc7 node_test.module node_test_entity_view_mode_alter(&$view_mode, $context)

Implements hook_entity_view_mode_alter().

File

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

Code

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