Drupal 8  8.0.2
ShortcutSetStorage Class Reference
Inheritance diagram for ShortcutSetStorage:

Public Member Functions

 __construct (EntityTypeInterface $entity_info, ConfigFactoryInterface $config_factory, UuidInterface $uuid_service, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager)
 
 deleteAssignedShortcutSets (ShortcutSetInterface $entity)
 
 assignUser (ShortcutSetInterface $shortcut_set, $account)
 
 unassignUser ($account)
 
 getAssignedToUser ($account)
 
 countAssignedUsers (ShortcutSetInterface $shortcut_set)
 
 getDefaultSet (AccountInterface $account)
 
- Public Member Functions inherited from ConfigEntityStorage
 __construct (EntityTypeInterface $entity_type, ConfigFactoryInterface $config_factory, UuidInterface $uuid_service, LanguageManagerInterface $language_manager)
 
 loadRevision ($revision_id)
 
 deleteRevision ($revision_id)
 
 save (EntityInterface $entity)
 
 importCreate ($name, Config $new_config, Config $old_config)
 
 importUpdate ($name, Config $new_config, Config $old_config)
 
 importDelete ($name, Config $new_config, Config $old_config)
 
 importRename ($old_name, Config $new_config, Config $old_config)
 
 createFromStorageRecord (array $values)
 
 updateFromStorageRecord (ConfigEntityInterface $entity, array $values)
 
 loadOverrideFree ($id)
 
 loadMultipleOverrideFree (array $ids=NULL)
 
- Public Member Functions inherited from EntityStorageBase
 __construct (EntityTypeInterface $entity_type)
 
 getEntityTypeId ()
 
 getEntityType ()
 
 loadUnchanged ($id)
 
 resetCache (array $ids=NULL)
 
 create (array $values=array())
 
 load ($id)
 
 loadMultiple (array $ids=NULL)
 
 delete (array $entities)
 
 save (EntityInterface $entity)
 
 loadByProperties (array $values=array())
 
 getQuery ($conjunction= 'AND')
 
 getAggregateQuery ($conjunction= 'AND')
 
- Public Member Functions inherited from EntityHandlerBase
 setModuleHandler (ModuleHandlerInterface $module_handler)
 

Static Public Member Functions

static createInstance (ContainerInterface $container, EntityTypeInterface $entity_info)
 
- Static Public Member Functions inherited from ConfigEntityStorage
static createInstance (ContainerInterface $container, EntityTypeInterface $entity_type)
 
static getIDFromConfigName ($config_name, $config_prefix)
 

Protected Attributes

 $moduleHandler
 
- Protected Attributes inherited from ConfigEntityStorage
 $uuidKey = 'uuid'
 
 $configFactory
 
 $configStorage
 
 $languageManager
 
 $entities = array()
 
 $overrideFree = FALSE
 
- Protected Attributes inherited from EntityStorageBase
 $entities = array()
 
 $entityTypeId
 
 $entityType
 
 $idKey
 
 $uuidKey
 
 $langcodeKey
 
 $uuidService
 
 $entityClass
 
- Protected Attributes inherited from EntityHandlerBase
 $moduleHandler
 

Additional Inherited Members

- Data Fields inherited from ConfigEntityStorage
const MAX_ID_LENGTH = 166
 
- Data Fields inherited from EntityStorageInterface
const FIELD_LOAD_CURRENT = 'FIELD_LOAD_CURRENT'
 
const FIELD_LOAD_REVISION = 'FIELD_LOAD_REVISION'
 
- Protected Member Functions inherited from ConfigEntityStorage
 getPrefix ()
 
 doCreate (array $values)
 
 doDelete ($entities)
 
 doSave ($id, EntityInterface $entity)
 
 mapToStorageRecord (EntityInterface $entity)
 
 has ($id, EntityInterface $entity)
 
 getFromStaticCache (array $ids)
 
 setStaticCache (array $entities)
 
 invokeHook ($hook, EntityInterface $entity)
 
 getQueryServiceName ()
 
- Protected Member Functions inherited from EntityStorageBase
 getFromStaticCache (array $ids)
 
 setStaticCache (array $entities)
 
 invokeHook ($hook, EntityInterface $entity)
 
 doCreate (array $values)
 
 doLoadMultiple (array $ids=NULL)
 
 postLoad (array &$entities)
 
 mapFromStorageRecords (array $records)
 
 has ($id, EntityInterface $entity)
 
 doDelete ($entities)
 
 doPreSave (EntityInterface $entity)
 
 doSave ($id, EntityInterface $entity)
 
 doPostSave (EntityInterface $entity, $update)
 
 buildPropertyQuery (QueryInterface $entity_query, array $values)
 
 getQueryServiceName ()
 
- Protected Member Functions inherited from EntityHandlerBase
 moduleHandler ()
 

Detailed Description

Defines a storage for shortcut_set entities.

Constructor & Destructor Documentation

__construct ( EntityTypeInterface  $entity_info,
ConfigFactoryInterface  $config_factory,
UuidInterface  $uuid_service,
ModuleHandlerInterface  $module_handler,
LanguageManagerInterface  $language_manager 
)

Constructs a ShortcutSetStorageController object.

Parameters
\Drupal\Core\Entity\EntityTypeInterface$entity_infoThe entity info for the entity type.
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe config factory service.
\Drupal\Component\Uuid\UuidInterface$uuid_serviceThe UUID service.
\Drupal\Core\Extension\ModuleHandlerInterface$module_handlerThe module handler.
\Drupal\Core\Language\LanguageManagerInterface$language_managerThe language manager.

References EntityHandlerBase\moduleHandler().

Here is the call graph for this function:

Member Function Documentation

assignUser ( ShortcutSetInterface  $shortcut_set,
  $account 
)

{Assigns a user to a particular shortcut set.

Parameters
\Drupal\shortcut\ShortcutSetInterface$shortcut_setAn object representing the shortcut set.
$accountA user account that will be assigned to use the set.
}

Implements ShortcutSetStorageInterface.

References db_merge(), and EntityInterface\id().

Here is the call graph for this function:

countAssignedUsers ( ShortcutSetInterface  $shortcut_set)

{Get the number of users who have this set assigned to them.

Parameters
\Drupal\shortcut\ShortcutSetInterface$shortcut_setThe shortcut to count the users assigned to.
Returns
int The number of users who have this set assigned to them.
}

Implements ShortcutSetStorageInterface.

References db_query(), and EntityInterface\id().

Here is the call graph for this function:

static createInstance ( ContainerInterface  $container,
EntityTypeInterface  $entity_info 
)
static

{}

deleteAssignedShortcutSets ( ShortcutSetInterface  $entity)

{Delete shortcut sets assigned to users.

Parameters
\Drupal\shortcut\ShortcutSetInterface$entityDelete the user assigned sets belonging to this shortcut.
}

Implements ShortcutSetStorageInterface.

References db_delete(), and EntityInterface\id().

Here is the call graph for this function:

getAssignedToUser (   $account)

{Get the name of the set assigned to this user.

Parameters
\Drupal\user\Entity\UserThe user account.
Returns
string The name of the shortcut set assigned to this user.
}

Implements ShortcutSetStorageInterface.

References db_select().

Here is the call graph for this function:

getDefaultSet ( AccountInterface  $account)

{Gets the default shortcut set for a given user account.

Parameters
\Drupal\Core\Session\AccountInterface$accountThe user account whose default shortcut set will be returned.
Returns
An object representing the default shortcut set.
}

Implements ShortcutSetStorageInterface.

References EntityStorageBase\load(), and EntityHandlerBase\moduleHandler().

Here is the call graph for this function:

unassignUser (   $account)

{Unassigns a user from any shortcut set they may have been assigned to.The user will go back to using whatever default set applies.

Parameters
$accountA user account that will be removed from the shortcut set assignment.
Returns
bool TRUE if the user was previously assigned to a shortcut set and has been successfully removed from it. FALSE if the user was already not assigned to any set.
}

Implements ShortcutSetStorageInterface.

References db_delete().

Here is the call graph for this function:


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