public function Permissions::transitionPermissions in Lightning Workflow 8.3
Same name and namespace in other branches
- 8.2 modules/lightning_scheduler/src/Permissions.php \Drupal\lightning_scheduler\Permissions::transitionPermissions()
Returns an array of transition permissions.
Return value
array The transition permissions.
Overrides Permissions::transitionPermissions
1 string reference to 'Permissions::transitionPermissions'
- lightning_scheduler.permissions.yml in modules/
lightning_scheduler/ lightning_scheduler.permissions.yml - modules/lightning_scheduler/lightning_scheduler.permissions.yml
File
- modules/
lightning_scheduler/ src/ Permissions.php, line 15
Class
- Permissions
- Exposes permissions for scheduling moderation state changes.
Namespace
Drupal\lightning_schedulerCode
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;
}