function ShortcutSetStorage::getDisplayedToUser

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\shortcut

Code

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.