You are here

class Permissions in Lightning Workflow 8.2

Same name and namespace in other branches
  1. 8.3 modules/lightning_scheduler/src/Permissions.php \Drupal\lightning_scheduler\Permissions

Hierarchy

Expanded class hierarchy of Permissions

File

modules/lightning_scheduler/src/Permissions.php, line 7

Namespace

Drupal\lightning_scheduler
View 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

Namesort descending Modifiers Type Description Overrides
Permissions::transitionPermissions public function Returns an array of transition permissions. Overrides Permissions::transitionPermissions
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.