public ShortcutSet::getShortcuts()
Returns all the shortcuts from a shortcut set sorted correctly.
Return value
\Drupal\shortcut\ShortcutInterface[] An array of shortcut entities.
Overrides ShortcutSetInterface::getShortcuts
File
- core/modules/shortcut/src/Entity/ShortcutSet.php, line 118
Class
- ShortcutSet
- Defines the Shortcut set configuration entity.
Namespace
Drupal\shortcut\Entity
Code
public function getShortcuts() { $shortcuts = \Drupal::entityManager()->getStorage('shortcut')->loadByProperties(array('shortcut_set' => $this->id())); uasort($shortcuts, array('\Drupal\shortcut\Entity\Shortcut', 'sort')); return $shortcuts; }
Please login to continue.