Drupal 8  8.0.2
ShortcutSet Class Reference
Inheritance diagram for ShortcutSet:

Public Member Functions

 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 resetLinkWeights ()
 
 getShortcuts ()
 
- Public Member Functions inherited from ConfigEntityBundleBase
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 preSave (EntityStorageInterface $storage)
 
- Public Member Functions inherited from ConfigEntityBase
 __construct (array $values, $entity_type)
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 isNew ()
 
 get ($property_name)
 
 set ($property_name, $value)
 
 enable ()
 
 disable ()
 
 setStatus ($status)
 
 status ()
 
 setSyncing ($syncing)
 
 isSyncing ()
 
 setUninstalling ($uninstalling)
 
 isUninstalling ()
 
 createDuplicate ()
 
 preSave (EntityStorageInterface $storage)
 
 calculateDependencies ()
 
 urlInfo ($rel= 'edit-form', array $options=[])
 
 url ($rel= 'edit-form', $options=array())
 
 link ($text=NULL, $rel= 'edit-form', array $options=[])
 
 toUrl ($rel= 'edit-form', array $options=[])
 
 getCacheTagsToInvalidate ()
 
 getDependencies ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
 onDependencyRemoval (array $dependencies)
 
 setThirdPartySetting ($module, $key, $value)
 
 getThirdPartySetting ($module, $key, $default=NULL)
 
 getThirdPartySettings ($module)
 
 unsetThirdPartySetting ($module, $key)
 
 getThirdPartyProviders ()
 
 isInstallable ()
 
 trustData ()
 
 hasTrustedData ()
 
 save ()
 
- Public Member Functions inherited from Entity
 __construct (array $values, $entity_type)
 
 id ()
 
 uuid ()
 
 isNew ()
 
 enforceIsNew ($value=TRUE)
 
 getEntityTypeId ()
 
 bundle ()
 
 label ()
 
 urlInfo ($rel= 'canonical', array $options=[])
 
 toUrl ($rel= 'canonical', array $options=[])
 
 hasLinkTemplate ($rel)
 
 link ($text=NULL, $rel= 'canonical', array $options=[])
 
 toLink ($text=NULL, $rel= 'canonical', array $options=[])
 
 url ($rel= 'canonical', $options=array())
 
 uriRelationships ()
 
 access ($operation, AccountInterface $account=NULL, $return_as_object=FALSE)
 
 language ()
 
 save ()
 
 delete ()
 
 createDuplicate ()
 
 getEntityType ()
 
 preSave (EntityStorageInterface $storage)
 
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 postCreate (EntityStorageInterface $storage)
 
 referencedEntities ()
 
 getCacheContexts ()
 
 getCacheTagsToInvalidate ()
 
 getCacheTags ()
 
 getCacheMaxAge ()
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 toArray ()
 
 getTypedData ()
 
 __sleep ()
 
 getConfigDependencyKey ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
- Public Member Functions inherited from RefinableCacheableDependencyInterface
 addCacheContexts (array $cache_contexts)
 
 addCacheTags (array $cache_tags)
 
 mergeCacheMaxAge ($max_age)
 
 addCacheableDependency ($other_object)
 

Static Public Member Functions

static preDelete (EntityStorageInterface $storage, array $entities)
 
- Static Public Member Functions inherited from ConfigEntityBundleBase
static postDelete (EntityStorageInterface $storage, array $entities)
 
- Static Public Member Functions inherited from ConfigEntityBase
static sort (ConfigEntityInterface $a, ConfigEntityInterface $b)
 
- Static Public Member Functions inherited from Entity
static preCreate (EntityStorageInterface $storage, array &$values)
 
static preDelete (EntityStorageInterface $storage, array $entities)
 
static postDelete (EntityStorageInterface $storage, array $entities)
 
static postLoad (EntityStorageInterface $storage, array &$entities)
 
static load ($id)
 
static loadMultiple (array $ids=NULL)
 
static create (array $values=array())
 

Protected Attributes

 $id
 
 $label
 
- Protected Attributes inherited from ConfigEntityBase
 $originalId
 
 $pluginConfigKey
 
 $status = TRUE
 
 $uuid
 
 $langcode = 'en'
 
 $third_party_settings = array()
 
 $_core = []
 
 $trustedData = FALSE
 
- Protected Attributes inherited from Entity
 $entityTypeId
 
 $enforceIsNew
 
 $typedData
 

Additional Inherited Members

- Protected Member Functions inherited from ConfigEntityBundleBase
 deleteDisplays ()
 
 loadDisplays ($entity_type_id)
 
- Protected Member Functions inherited from ConfigEntityBase
 getTypedConfig ()
 
 addDependency ($type, $name)
 
 invalidateTagsOnSave ($update)
 
- Protected Member Functions inherited from Entity
 entityManager ()
 
 entityTypeManager ()
 
 languageManager ()
 
 uuidGenerator ()
 
 linkTemplates ()
 
 urlRouteParameters ($rel)
 
 invalidateTagsOnSave ($update)
 
- Static Protected Member Functions inherited from ConfigEntityBase
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 
static getConfigManager ()
 
- Static Protected Member Functions inherited from Entity
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 

Detailed Description

Defines the Shortcut set configuration entity.

( id = "shortcut_set", label = ("Shortcut set"), handlers = { "storage" = "Drupal\shortcut\ShortcutSetStorage", "access" = "Drupal\shortcut\ShortcutSetAccessControlHandler", "list_builder" = "Drupal\shortcut\ShortcutSetListBuilder", "form" = { "default" = "Drupal\shortcut\ShortcutSetForm", "add" = "Drupal\shortcut\ShortcutSetForm", "edit" = "Drupal\shortcut\ShortcutSetForm", "customize" = "Drupal\shortcut\Form\SetCustomize", "delete" = "Drupal\shortcut\Form\ShortcutSetDeleteForm" } }, config_prefix = "set", bundle_of = "shortcut", entity_keys = { "id" = "id", "label" = "label" }, links = { "customize-form" = "/admin/config/user-interface/shortcut/manage/{shortcut_set}/customize", "delete-form" = "/admin/config/user-interface/shortcut/manage/{shortcut_set}/delete", "edit-form" = "/admin/config/user-interface/shortcut/manage/{shortcut_set}", "collection" = "/admin/config/user-interface/shortcut", }, config_export = { "id", "label", } )

Member Function Documentation

getShortcuts ( )

{Returns all the shortcuts from a shortcut set sorted correctly.

Returns
[] An array of shortcut entities.
}

Implements ShortcutSetInterface.

References Drupal\entityManager().

Referenced by ShortcutSet\resetLinkWeights().

Here is the call graph for this function:

Here is the caller graph for this function:

postSave ( EntityStorageInterface  $storage,
  $update = TRUE 
)

{}

References Entity\id(), and ConfigEntityBase\isSyncing().

Here is the call graph for this function:

static preDelete ( EntityStorageInterface  $storage,
array  $entities 
)
static

{}

References Drupal\entityManager(), and Drupal\entityQuery().

Here is the call graph for this function:

resetLinkWeights ( )

{Resets the link weights in a shortcut set to match their current order.This function can be used, for example, when a new shortcut link is added to the set. If the link is added to the end of the array and this function is called, it will force that link to display at the end of the list.

Returns
The shortcut set.
}

Implements ShortcutSetInterface.

References ShortcutSet\getShortcuts().

Here is the call graph for this function:


The documentation for this class was generated from the following file: