public function ShortcutSetStorage::deleteAssignedShortcutSets in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/shortcut/src/ShortcutSetStorage.php \Drupal\shortcut\ShortcutSetStorage::deleteAssignedShortcutSets()
Delete shortcut sets assigned to users.
Parameters
\Drupal\shortcut\ShortcutSetInterface $entity: Delete the user assigned sets belonging to this shortcut.
Overrides ShortcutSetStorageInterface::deleteAssignedShortcutSets
File
- core/
modules/ shortcut/ src/ ShortcutSetStorage.php, line 67 - Contains \Drupal\shortcut\ShortcutSetStorage.
Class
- ShortcutSetStorage
- Defines a storage for shortcut_set entities.
Namespace
Drupal\shortcutCode
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.
db_delete('shortcut_set_users')
->condition('set_name', $entity
->id())
->execute();
}