class Permissions in Lightning Workflow 8.3
Same name and namespace in other branches
- 8.2 modules/lightning_scheduler/src/Permissions.php \Drupal\lightning_scheduler\Permissions
Exposes permissions for scheduling moderation state changes.
Hierarchy
- class \Drupal\content_moderation\Permissions uses StringTranslationTrait
- class \Drupal\lightning_scheduler\Permissions
Expanded class hierarchy of Permissions
File
- modules/
lightning_scheduler/ src/ Permissions.php, line 10
Namespace
Drupal\lightning_schedulerView source
class Permissions extends BasePermissions {
/**
* {@inheritdoc}
*/
public function transitionPermissions() {
$permissions = parent::transitionPermissions();
foreach ($permissions as $permission => $info) {
unset($permissions[$permission]);
$permission = preg_replace('/^use /', 'schedule ', $permission);
/** @var \Drupal\Core\StringTranslation\TranslatableMarkup $title */
$title = $info['title'];
$info['title'] = $this
->t('%workflow workflow: Schedule %transition transition.', $title
->getArguments());
$permissions[$permission] = $info;
}
return $permissions;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Permissions:: |
public | function |
Returns an array of transition permissions. Overrides Permissions:: |
|
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. |