public ShortcutSetStorage::deleteAssignedShortcutSets(ShortcutSetInterface $entity)
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 62
Class
- ShortcutSetStorage
- Defines a storage for shortcut_set entities.
Namespace
Drupal\shortcut
Code
1 2 3 4 5 6 7 | 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(); } |
Please login to continue.