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 711
Hooks and documentation related to entities.

Code

function hook_entity_view_mode_info_alter(&$view_modes) {
  $view_modes['user']['full']['status'] = TRUE;
}
doc_Drupal
2016-10-29 09:18:08
Comments
Leave a Comment

Please login to continue.