@trigger_error("Calling ".__FUNCTION__."() with 'shortcut_current_displayed_set' as an argument is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement for this usage. See https://www.drupal.org/node/3427050",E_USER_DEPRECATED);
@trigger_error(__FUNCTION__.'() is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use \Drupal\shortcut\ShortcutSetStorageInterface::getDisplayedToUser() instead. See https://www.drupal.org/node/3427050',E_USER_DEPRECATED);
$shortcut_sets=&drupal_static(__FUNCTION__,[]);
$user=\Drupal::currentUser();
if(!isset($account)){
$account=$user;
}
// Try to return a shortcut set from the static cache.
if(isset($shortcut_sets[$account->id()])){
return$shortcut_sets[$account->id()];
}
// If none was found, try to find a shortcut set that is explicitly assigned
// to this user.
$shortcut_set=\Drupal::entityTypeManager()
->getStorage('shortcut_set')
->getDisplayedToUser($account);
$shortcut_sets[$account->id()]=$shortcut_set;
return$shortcut_set;
}
/**
* Returns the default shortcut set for a given user account.
*
* @param object $account
* (optional) The user account whose default shortcut set will be returned.
* If not provided, the function will return the currently logged-in user's
@trigger_error(__FUNCTION__.'() is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use \Drupal\shortcut\ShortcutSetStorageInterface::getDefaultSet() instead. See https://www.drupal.org/node/3427050',E_USER_DEPRECATED);
$user=\Drupal::currentUser();
if(!isset($account)){
$account=$user;
}
return\Drupal::entityTypeManager()
->getStorage('shortcut_set')
->getDefaultSet($account);
}
/**
* Returns an array of shortcut links, suitable for rendering.
@trigger_error('Calling '.__METHOD__.'() without the $entityTypeManager argument is deprecated in drupal:10.3.0 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3427050',E_USER_DEPRECATED);
@trigger_error('Calling '.__METHOD__.'() without the $currentUser argument is deprecated in drupal:10.3.0 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3427050',E_USER_DEPRECATED);