function workspaces_entity_predelete

Same name in other branches
  1. 8.9.x core/modules/workspaces/workspaces.module \workspaces_entity_predelete()
  2. 10 core/modules/workspaces/workspaces.module \workspaces_entity_predelete()
  3. 11.x core/modules/workspaces/workspaces.module \workspaces_entity_predelete()

Implements hook_entity_predelete().

File

core/modules/workspaces/workspaces.module, line 136

Code

function workspaces_entity_predelete(EntityInterface $entity) {
    if ($entity->getEntityTypeId() === 'workspace') {
        \Drupal::service('workspaces.repository')->resetCache();
    }
    return \Drupal::service('class_resolver')->getInstanceFromDefinition(EntityOperations::class)
        ->entityPredelete($entity);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.