1 entity.api.php hook_entity_view_mode_update($view_mode, $entity_type)

Respond to update of a display mode.

Parameters

string $view_mode: The display mode that is to be used to display the entity.

$entity_type: The type of entity being saved (i.e. node, user, comment).

Related topics

File

core/modules/entity/entity.api.php, line 550
Hooks provided by the Entity module.

Code

function hook_entity_view_mode_update($view_mode, $entity_type) {
  config_set('my_module.view_modes', 'view_mode_list', array($entity_type => $view_mode));
}