class DeveloperAppPermissionProvider in Apigee Edge 8
Permission provider for developer app entities.
Hierarchy
- class \Drupal\entity\EntityPermissionProviderBase implements EntityHandlerInterface, EntityPermissionProviderInterface uses StringTranslationTrait
- class \Drupal\entity\UncacheableEntityPermissionProvider
- class \Drupal\apigee_edge\Entity\EdgeEntityPermissionProviderBase
- class \Drupal\apigee_edge\Entity\DeveloperAppPermissionProvider
- class \Drupal\apigee_edge\Entity\EdgeEntityPermissionProviderBase
- class \Drupal\entity\UncacheableEntityPermissionProvider
Expanded class hierarchy of DeveloperAppPermissionProvider
File
- src/
Entity/ DeveloperAppPermissionProvider.php, line 27
Namespace
Drupal\apigee_edge\EntityView source
class DeveloperAppPermissionProvider extends EdgeEntityPermissionProviderBase {
/**
* {@inheritdoc}
*/
protected function buildEntityTypePermissions(EntityTypeInterface $entity_type) {
$permissions = parent::buildEntityTypePermissions($entity_type);
$entity_type_id = $entity_type
->id();
$permissions["analytics any {$entity_type_id}"] = [
'title' => $this
->t('View any @type analytics', [
'@type' => $entity_type
->getSingularLabel(),
]),
];
$permissions["analytics own {$entity_type_id}"] = [
'title' => $this
->t('View own @type analytics', [
'@type' => $entity_type
->getPluralLabel(),
]),
];
$permissions["add_api_key own {$entity_type_id}"] = [
'title' => $this
->t('Add API key to own @type', [
'@type' => $entity_type
->getPluralLabel(),
]),
];
$permissions["add_api_key any {$entity_type_id}"] = [
'title' => $this
->t('Add API key to any @type', [
'@type' => $entity_type
->getPluralLabel(),
]),
];
$permissions["revoke_api_key own {$entity_type_id}"] = [
'title' => $this
->t('Revoke API key from own @type', [
'@type' => $entity_type
->getPluralLabel(),
]),
];
$permissions["revoke_api_key any {$entity_type_id}"] = [
'title' => $this
->t('Revoke API key from any @type', [
'@type' => $entity_type
->getPluralLabel(),
]),
];
$permissions["delete_api_key own {$entity_type_id}"] = [
'title' => $this
->t('Delete API key from own @type', [
'@type' => $entity_type
->getPluralLabel(),
]),
];
$permissions["delete_api_key any {$entity_type_id}"] = [
'title' => $this
->t('Delete API key from any @type', [
'@type' => $entity_type
->getPluralLabel(),
]),
];
$permissions["edit_api_products {$entity_type_id}"] = [
'title' => $this
->t('Edit API products for @type', [
'@type' => $entity_type
->getPluralLabel(),
]),
];
return $permissions;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeveloperAppPermissionProvider:: |
protected | function |
Builds permissions for the entity_type granularity. Overrides UncacheableEntityPermissionProvider:: |
|
EntityPermissionProviderBase:: |
protected | property | The entity type bundle info. | |
EntityPermissionProviderBase:: |
public | function |
Builds permissions for the given entity type. Overrides EntityPermissionProviderInterface:: |
|
EntityPermissionProviderBase:: |
public static | function |
Instantiates a new instance of this entity handler. Overrides EntityHandlerInterface:: |
|
EntityPermissionProviderBase:: |
protected | function | Adds the provider and converts the titles to strings to allow sorting. | |
EntityPermissionProviderBase:: |
public | function | Constructs a new EntityPermissionProvider object. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
UncacheableEntityPermissionProvider:: |
protected | function |
Builds permissions for the bundle granularity. Overrides EntityPermissionProviderBase:: |