function ShortcutSetStorage::deleteAssignedShortcutSets

Same name and namespace in other branches
  1. 9 core/modules/shortcut/src/ShortcutSetStorage.php \Drupal\shortcut\ShortcutSetStorage::deleteAssignedShortcutSets()
  2. 10 core/modules/shortcut/src/ShortcutSetStorage.php \Drupal\shortcut\ShortcutSetStorage::deleteAssignedShortcutSets()
  3. 11.x core/modules/shortcut/src/ShortcutSetStorage.php \Drupal\shortcut\ShortcutSetStorage::deleteAssignedShortcutSets()

Overrides ShortcutSetStorageInterface::deleteAssignedShortcutSets

File

core/modules/shortcut/src/ShortcutSetStorage.php, line 79

Class

ShortcutSetStorage
Defines a storage for shortcut_set entities.

Namespace

Drupal\shortcut

Code

public function deleteAssignedShortcutSets(ShortcutSetInterface $entity) {
    // First, delete any user assignments for this set, so that each of these
    // users will go back to using whatever default set applies.
    $this->connection
        ->delete('shortcut_set_users')
        ->condition('set_name', $entity->id())
        ->execute();
}

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