function shortcut_set_assign_user
Same name and namespace in other branches
- 7.x modules/shortcut/shortcut.module \shortcut_set_assign_user()
Assigns a user to a particular shortcut set.
Parameters
$shortcut_set Drupal\shortcut\Entity\Shortcut: An object representing the shortcut set.
$account: A user account that will be assigned to use the set.
Deprecated
in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal::entityTypeManager()->getStorage('shortcut_set')->assignUser().
File
-
core/
modules/ shortcut/ shortcut.module, line 129
Code
function shortcut_set_assign_user($shortcut_set, $account) {
\Drupal::entityTypeManager()->getStorage('shortcut_set')
->assignUser($shortcut_set, $account);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.