function ShortcutSet::getShortcuts

Same name and namespace in other branches
  1. 11.x core/modules/shortcut/src/Entity/ShortcutSet.php \Drupal\shortcut\Entity\ShortcutSet::getShortcuts()

File

core/modules/shortcut/src/Entity/ShortcutSet.php, line 126

Class

ShortcutSet
Defines the Shortcut set configuration entity.

Namespace

Drupal\shortcut\Entity

Code

public function getShortcuts() {
  $shortcuts = \Drupal::entityTypeManager()->getStorage('shortcut')
    ->loadByProperties([
    'shortcut_set' => $this->id(),
  ]);
  uasort($shortcuts, [
    '\\Drupal\\shortcut\\Entity\\Shortcut',
    'sort',
  ]);
  return $shortcuts;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.