class CalculatedGroupPermissions in Group 2.0.x
Same name and namespace in other branches
- 8 src/Access/CalculatedGroupPermissions.php \Drupal\group\Access\CalculatedGroupPermissions
Represents a calculated set of group permissions with cacheable metadata.
Hierarchy
- class \Drupal\group\Access\CalculatedGroupPermissions implements CalculatedGroupPermissionsInterface uses CacheableDependencyTrait, CalculatedGroupPermissionsTrait
Expanded class hierarchy of CalculatedGroupPermissions
See also
\Drupal\group\Access\ChainGroupPermissionCalculator
2 files declare their use of CalculatedGroupPermissions
- CalculatedGroupPermissionsTest.php in tests/
src/ Unit/ CalculatedGroupPermissionsTest.php - ChainGroupPermissionCalculatorTest.php in tests/
src/ Kernel/ ChainGroupPermissionCalculatorTest.php
File
- src/
Access/ CalculatedGroupPermissions.php, line 12
Namespace
Drupal\group\AccessView source
class CalculatedGroupPermissions implements CalculatedGroupPermissionsInterface {
use CacheableDependencyTrait;
use CalculatedGroupPermissionsTrait;
/**
* Constructs a new CalculatedGroupPermissions.
*
* @param \Drupal\group\Access\CalculatedGroupPermissionsInterface $source
* The calculated group permission to create a value object from.
*/
public function __construct(CalculatedGroupPermissionsInterface $source) {
foreach ($source
->getItems() as $item) {
$this->items[$item
->getScope()][$item
->getIdentifier()] = $item;
}
$this
->setCacheability($source);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheableDependencyTrait:: |
protected | property | Cache contexts. | |
CacheableDependencyTrait:: |
protected | property | Cache max-age. | |
CacheableDependencyTrait:: |
protected | property | Cache tags. | |
CacheableDependencyTrait:: |
public | function | 4 | |
CacheableDependencyTrait:: |
public | function | 4 | |
CacheableDependencyTrait:: |
public | function | 4 | |
CacheableDependencyTrait:: |
protected | function | Sets cacheability; useful for value object constructors. | |
CalculatedGroupPermissions:: |
public | function | Constructs a new CalculatedGroupPermissions. | |
CalculatedGroupPermissionsTrait:: |
protected | property | A list of calculated group permission items, keyed by scope and identifier. | |
CalculatedGroupPermissionsTrait:: |
public | function | ||
CalculatedGroupPermissionsTrait:: |
public | function | ||
CalculatedGroupPermissionsTrait:: |
public | function |