function EntityOperations::entityUpdate
Implements hook_entity_update().
Attributes
#[Hook('entity_update')]
File
-
core/
modules/ workspaces/ src/ Hook/ EntityOperations.php, line 86
Class
- EntityOperations
- Defines a class for reacting to entity runtime hooks.
Namespace
Drupal\workspaces\HookCode
public function entityUpdate(EntityInterface $entity) : void {
if ($entity->getEntityTypeId() === 'workspace') {
$this->workspaceRepository
->resetCache();
}
if ($this->workspaceInfo
->isEntityIgnored($entity) || !$this->workspaceInfo
->isEntitySupported($entity)) {
return;
}
$this->workspaceManager
->getActiveWorkspace()?->getProvider()
->entityUpdate($entity);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.