function shortcut_set_assign_user
shortcut_set_assign_user($shortcut_set, $account)
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.x, will be removed before Drupal 9.0. Use \Drupal::entityManager()->getStorage('shortcut_set')->assignUser().
File
- core/modules/shortcut/shortcut.module, line 124
- Allows users to manage customizable lists of shortcut links.
Code
function shortcut_set_assign_user($shortcut_set, $account) { \Drupal::entityManager() ->getStorage('shortcut_set') ->assignUser($shortcut_set, $account); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!shortcut!shortcut.module/function/shortcut_set_assign_user/8.1.x