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 711
- Hooks and documentation related to entities.
Code
1 2 3 | function hook_entity_view_mode_info_alter(& $view_modes ) { $view_modes [ 'user' ][ 'full' ][ 'status' ] = TRUE; } |
Please login to continue.