function ShortcutSetStorage::assignUser
Same name in other branches
- 8.9.x core/modules/shortcut/src/ShortcutSetStorage.php \Drupal\shortcut\ShortcutSetStorage::assignUser()
- 10 core/modules/shortcut/src/ShortcutSetStorage.php \Drupal\shortcut\ShortcutSetStorage::assignUser()
- 11.x core/modules/shortcut/src/ShortcutSetStorage.php \Drupal\shortcut\ShortcutSetStorage::assignUser()
Overrides ShortcutSetStorageInterface::assignUser
File
-
core/
modules/ shortcut/ src/ ShortcutSetStorage.php, line 90
Class
- ShortcutSetStorage
- Defines a storage for shortcut_set entities.
Namespace
Drupal\shortcutCode
public function assignUser(ShortcutSetInterface $shortcut_set, $account) {
$this->connection
->merge('shortcut_set_users')
->key('uid', $account->id())
->fields([
'set_name' => $shortcut_set->id(),
])
->execute();
drupal_static_reset('shortcut_current_displayed_set');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.