function ShortcutSetStorage::getDisplayedToUser
Gets the shortcut set to be displayed for a given user account.
Parameters
\Drupal\Core\Session\AccountInterface $account: The user account whose default shortcut set will be returned.
Return value
\Drupal\shortcut\ShortcutSetInterface An object representing the default shortcut set.
Overrides ShortcutSetStorageInterface::getDisplayedToUser
2 calls to ShortcutSetStorage::getDisplayedToUser()
- ShortcutSetStorage::assignUser in core/modules/ shortcut/ src/ ShortcutSetStorage.php 
- Assigns a user to a particular shortcut set.
- ShortcutSetStorage::unassignUser in core/modules/ shortcut/ src/ ShortcutSetStorage.php 
- Un-assigns a user from any shortcut set they may have been assigned to.
File
- 
              core/modules/ shortcut/ src/ ShortcutSetStorage.php, line 129 
Class
- ShortcutSetStorage
- Defines a storage for shortcut_set entities.
Namespace
Drupal\shortcutCode
public function getDisplayedToUser(AccountInterface $account) : ShortcutSetInterface {
  if ($set_name = $this->getAssignedToUser($account)) {
    return $this->load($set_name);
  }
  return $this->getDefaultSet($account);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
