Acts on an entity before the presave hook is invoked.
Used before the entity is saved and before invoking the presave hook.
Overrides ConfigStorageController::preSave
File
- drupal/core/modules/entity/lib/Drupal/entity/EntityViewModeStorageController.php, line 21
- Contains \Drupal\entity\EntityViewModeStorageController.
Class
- EntityViewModeStorageController
- Defines the storage controller class for entity view modes.
Namespace
Drupal\entity
Code
protected function preSave(EntityInterface $view_mode) {
entity_info_cache_clear();
}