function entity_test_update_view_presave
Same name and namespace in other branches
- 9 core/modules/system/tests/modules/entity_test_update/entity_test_update.module \entity_test_update_view_presave()
- 10 core/modules/system/tests/modules/entity_test_update/entity_test_update.module \entity_test_update_view_presave()
- 11.x core/modules/system/tests/modules/entity_test_update/entity_test_update.module \entity_test_update_view_presave()
Implements hook_ENTITY_TYPE_presave() for the 'view' entity type.
File
-
core/
modules/ system/ tests/ modules/ entity_test_update/ entity_test_update.module, line 58
Code
function entity_test_update_view_presave(EntityInterface $entity) {
if (\Drupal::state()->get('entity_test_update.throw_view_exception') === $entity->id()) {
throw new \LogicException('The view could not be saved.');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.