class DeployPermissions in Deploy - Content Staging 8
Defines permissions for Deploy module.
Hierarchy
- class \Drupal\deploy\DeployPermissions uses StringTranslationTrait
Expanded class hierarchy of DeployPermissions
File
- src/
DeployPermissions.php, line 11
Namespace
Drupal\deployView source
class DeployPermissions {
use StringTranslationTrait;
/**
* Generates the permissions for workspace pointer entities.
*
* @return array
* The permissions for workspace pointer entities.
*/
public function workspacePointerPermissions() {
$permissions = [];
$workspace_pointers = WorkspacePointer::loadMultiple();
foreach ($workspace_pointers as $workspace_pointer) {
$permissions['Deploy to ' . $workspace_pointer
->label()] = [
'title' => $this
->t('Deploy to @workspace_pointer', [
'@workspace_pointer' => $workspace_pointer
->label(),
]),
];
}
return $permissions;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeployPermissions:: |
public | function | Generates the permissions for workspace pointer entities. | |
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. |