function hook_entity_view_mode_info_alter
hook_entity_view_mode_info_alter(&$view_modes)
Alter the view modes for entity types.
Parameters
array $view_modes: An array of view modes, keyed first by entity type, then by view mode name.
See also
\Drupal\Core\Entity\EntityManagerInterface::getAllViewModes()
\Drupal\Core\Entity\EntityManagerInterface::getViewModes()
Related topics
- Hooks
- Define functions that alter the behavior of Drupal core.
File
- core/lib/Drupal/Core/Entity/entity.api.php, line 702
- Hooks and documentation related to entities.
Code
function hook_entity_view_mode_info_alter(&$view_modes) { $view_modes['user']['full']['status'] = TRUE; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!entity.api.php/function/hook_entity_view_mode_info_alter/8.1.x