function entity_test_entity_test_view_mode_alter
Same name in other branches
- 11.x core/modules/system/tests/modules/entity_test/entity_test.module \entity_test_entity_test_view_mode_alter()
Implements hook_ENTITY_TYPE_view_mode_alter().
File
-
core/
modules/ system/ tests/ modules/ entity_test/ entity_test.module, line 300
Code
function entity_test_entity_test_view_mode_alter(string &$view_mode, EntityInterface $entity) : void {
if ($view_mode == 'entity_test.vm_alter_test') {
$view_mode = 'entity_test.vm_alter_full';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.