interface GroupRoleStorageInterface in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/Storage/GroupRoleStorageInterface.php \Drupal\group\Entity\Storage\GroupRoleStorageInterface
Defines an interface for group role entity storage classes.
Hierarchy
- interface \Drupal\Core\Entity\EntityStorageInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityStorageInterface
- interface \Drupal\group\Entity\Storage\GroupRoleStorageInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityStorageInterface
Expanded class hierarchy of GroupRoleStorageInterface
All classes that implement GroupRoleStorageInterface
File
- src/
Entity/ Storage/ GroupRoleStorageInterface.php, line 13
Namespace
Drupal\group\Entity\StorageView source
interface GroupRoleStorageInterface extends ConfigEntityStorageInterface {
/**
* Retrieves all GroupRole entities for a user within a group.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The account to load the group role entities for.
* @param \Drupal\group\Entity\GroupInterface $group
* The group entity to find the user's role entities in.
* @param boolean $include_implied
* (optional) Whether to include the implied roles 'anonymous', 'outsider'
* and 'member'. Defaults to TRUE.
*
* @return \Drupal\group\Entity\GroupRoleInterface[]
* The group roles matching the criteria.
*/
public function loadByUserAndGroup(AccountInterface $account, GroupInterface $group, $include_implied = TRUE);
/**
* Retrieves all synchronized GroupRole entities by group types.
*
* @param string[] $group_type_ids
* The list of group type IDs to load the synchronized group roles for.
*
* @return \Drupal\group\Entity\GroupRoleInterface[]
* The group roles matching the group types.
*/
public function loadSynchronizedByGroupTypes(array $group_type_ids);
/**
* Retrieves all synchronized GroupRole entities by user roles.
*
* @param string[] $role_ids
* The list of user role IDs to load the synchronized group roles for.
*
* @return \Drupal\group\Entity\GroupRoleInterface[]
* The group roles matching the user roles.
*/
public function loadSynchronizedByUserRoles(array $role_ids);
/**
* Creates internal group roles for group types.
*
* Internal group roles are the bare minimum group roles that a group type
* needs to function properly, such as the Member group role.
*
* @param string[] $group_type_ids
* (optional) A list of group type IDs to synchronize roles for. Leave empty
* to synchronize roles for all group types.
*/
public function createInternal($group_type_ids = NULL);
/**
* Creates group roles for all user roles.
*
* @param string[] $group_type_ids
* (optional) A list of group type IDs to synchronize roles for. Leave empty
* to synchronize roles for all group types.
* @param string[] $role_ids
* (optional) A list of user role IDs to synchronize. Leave empty to
* synchronize all user roles.
*/
public function createSynchronized($group_type_ids = NULL, $role_ids = NULL);
/**
* Updates the label of all group roles for a user role.
*
* @param \Drupal\User\RoleInterface $role
* The user role to update the group role labels for.
*/
public function updateSynchronizedLabels(RoleInterface $role);
/**
* Resets the internal, static cache used by ::loadByUserAndGroup().
*
* @param \Drupal\Core\Session\AccountInterface $account
* The account to reset the cached group roles for.
* @param \Drupal\group\Entity\GroupInterface $group
* (optional) The group to reset the user's cached group roles for. Leave
* blank to reset the user's roles in all groups.
*/
public function resetUserGroupRoleCache(AccountInterface $account, GroupInterface $group = NULL);
}
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 |
GroupRoleStorageInterface:: |
public | function | Creates internal group roles for group types. | 1 |
GroupRoleStorageInterface:: |
public | function | Creates group roles for all user roles. | 1 |
GroupRoleStorageInterface:: |
public | function | Retrieves all GroupRole entities for a user within a group. | 1 |
GroupRoleStorageInterface:: |
public | function | Retrieves all synchronized GroupRole entities by group types. | 1 |
GroupRoleStorageInterface:: |
public | function | Retrieves all synchronized GroupRole entities by user roles. | 1 |
GroupRoleStorageInterface:: |
public | function | Resets the internal, static cache used by ::loadByUserAndGroup(). | 1 |
GroupRoleStorageInterface:: |
public | function | Updates the label of all group roles for a user role. | 1 |