function EntityOperations::entityPresave
Same name in this branch
- main core/modules/content_moderation/src/EntityOperations.php \Drupal\content_moderation\EntityOperations::entityPresave()
Same name and namespace in other branches
- 11.x core/modules/content_moderation/src/EntityOperations.php \Drupal\content_moderation\EntityOperations::entityPresave()
- 11.x core/modules/workspaces/src/Hook/EntityOperations.php \Drupal\workspaces\Hook\EntityOperations::entityPresave()
- 10 core/modules/content_moderation/src/EntityOperations.php \Drupal\content_moderation\EntityOperations::entityPresave()
- 10 core/modules/workspaces/src/EntityOperations.php \Drupal\workspaces\EntityOperations::entityPresave()
- 9 core/modules/content_moderation/src/EntityOperations.php \Drupal\content_moderation\EntityOperations::entityPresave()
- 9 core/modules/workspaces/src/EntityOperations.php \Drupal\workspaces\EntityOperations::entityPresave()
- 8.9.x core/modules/content_moderation/src/EntityOperations.php \Drupal\content_moderation\EntityOperations::entityPresave()
- 8.9.x core/modules/workspaces/src/EntityOperations.php \Drupal\workspaces\EntityOperations::entityPresave()
Implements hook_entity_presave().
Attributes
#[Hook('entity_presave', order: Order::First)]
#[ReorderHook('entity_presave', class: ContentModerationHooks::class, method: 'entityPresave', order: new OrderBefore([
'workspaces',
]))]
File
-
core/
modules/ workspaces/ src/ Hook/ EntityOperations.php, line 52
Class
- EntityOperations
- Defines a class for reacting to entity runtime hooks.
Namespace
Drupal\workspaces\HookCode
public function entityPresave(EntityInterface $entity) : void {
if ($this->workspaceInfo
->isEntityIgnored($entity)) {
return;
}
$this->workspaceManager
->getActiveWorkspace()?->getProvider()
->entityPresave($entity);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.