interface ShortcutSetStorageInterface in Drupal 8
Same name and namespace in other branches
- 9 core/modules/shortcut/src/ShortcutSetStorageInterface.php \Drupal\shortcut\ShortcutSetStorageInterface
Defines an interface for shortcut_set entity storage classes.
Hierarchy
- interface \Drupal\Core\Entity\EntityStorageInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityStorageInterface
- interface \Drupal\shortcut\ShortcutSetStorageInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityStorageInterface
Expanded class hierarchy of ShortcutSetStorageInterface
All classes that implement ShortcutSetStorageInterface
3 files declare their use of ShortcutSetStorageInterface
- ShortcutSetDeleteForm.php in core/
modules/ shortcut/ src/ Form/ ShortcutSetDeleteForm.php - ShortcutSetUsers.php in core/
modules/ shortcut/ src/ Plugin/ migrate/ destination/ ShortcutSetUsers.php - SwitchShortcutSet.php in core/
modules/ shortcut/ src/ Form/ SwitchShortcutSet.php
File
- core/
modules/ shortcut/ src/ ShortcutSetStorageInterface.php, line 11
Namespace
Drupal\shortcutView source
interface ShortcutSetStorageInterface extends ConfigEntityStorageInterface {
/**
* Assigns a user to a particular shortcut set.
*
* @param \Drupal\shortcut\ShortcutSetInterface $shortcut_set
* An object representing the shortcut set.
* @param $account
* A user account that will be assigned to use the set.
*/
public function assignUser(ShortcutSetInterface $shortcut_set, $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.
*
* @param $account
* A user account that will be removed from the shortcut set assignment.
*
* @return 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.
*/
public function unassignUser($account);
/**
* Delete shortcut sets assigned to users.
*
* @param \Drupal\shortcut\ShortcutSetInterface $entity
* Delete the user assigned sets belonging to this shortcut.
*/
public function deleteAssignedShortcutSets(ShortcutSetInterface $entity);
/**
* Get the name of the set assigned to this user.
*
* @param \Drupal\user\Entity\User $account
* The user account.
*
* @return string
* The name of the shortcut set assigned to this user.
*/
public function getAssignedToUser($account);
/**
* Get the number of users who have this set assigned to them.
*
* @param \Drupal\shortcut\ShortcutSetInterface $shortcut_set
* The shortcut to count the users assigned to.
*
* @return int
* The number of users who have this set assigned to them.
*/
public function countAssignedUsers(ShortcutSetInterface $shortcut_set);
/**
* Gets the default shortcut set for a given user account.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user account whose default shortcut set will be returned.
*
* @return \Drupal\shortcut\ShortcutSetInterface
* An object representing the default shortcut set.
*/
public function getDefaultSet(AccountInterface $account);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigEntityStorageInterface:: |
public | function | Creates a configuration entity from storage values. | 1 |
ConfigEntityStorageInterface:: |
public static | function | Extracts the configuration entity ID from the full configuration name. | 1 |
ConfigEntityStorageInterface:: |
public | function | Loads one or more entities in their original form without overrides. | 1 |
ConfigEntityStorageInterface:: |
public | function | Loads one entity in their original form without overrides. | 1 |
ConfigEntityStorageInterface:: |
public | function | Updates a configuration entity from storage values. | 1 |
EntityStorageInterface:: |
public | function | Constructs a new entity object, without permanently saving it. | 1 |
EntityStorageInterface:: |
public | function | Deletes permanently saved entities. | 1 |
EntityStorageInterface:: |
public | function | Delete a specific entity revision. | 4 |
EntityStorageInterface:: |
constant | Load the most recent version of an entity's field data. | ||
EntityStorageInterface:: |
constant | Load the version of an entity's field data specified in the entity. | ||
EntityStorageInterface:: |
public | function | Gets an aggregated query instance. | 1 |
EntityStorageInterface:: |
public | function | Gets the entity type definition. | 1 |
EntityStorageInterface:: |
public | function | Gets the entity type ID. | 1 |
EntityStorageInterface:: |
public | function | Gets an entity query instance. | 1 |
EntityStorageInterface:: |
public | function | Determines if the storage contains any data. | 1 |
EntityStorageInterface:: |
public | function | Loads one entity. | 1 |
EntityStorageInterface:: |
public | function | Load entities by their property values. | 1 |
EntityStorageInterface:: |
public | function | Loads one or more entities. | 1 |
EntityStorageInterface:: |
public | function | Load a specific entity revision. | 4 |
EntityStorageInterface:: |
public | function | Loads an unchanged entity from the database. | 1 |
EntityStorageInterface:: |
public | function | Resets the internal, static entity cache. | 1 |
EntityStorageInterface:: |
public | function | Restores a previously saved entity. | 1 |
EntityStorageInterface:: |
public | function | Saves the entity permanently. | 1 |
ShortcutSetStorageInterface:: |
public | function | Assigns a user to a particular shortcut set. | 1 |
ShortcutSetStorageInterface:: |
public | function | Get the number of users who have this set assigned to them. | 1 |
ShortcutSetStorageInterface:: |
public | function | Delete shortcut sets assigned to users. | 1 |
ShortcutSetStorageInterface:: |
public | function | Get the name of the set assigned to this user. | 1 |
ShortcutSetStorageInterface:: |
public | function | Gets the default shortcut set for a given user account. | 1 |
ShortcutSetStorageInterface:: |
public | function | Unassigns a user from any shortcut set they may have been assigned to. | 1 |