You are here

public static function ScheduledTransitionsPermissions::viewScheduledTransitionsPermission in Scheduled Transitions 8

Same name and namespace in other branches
  1. 2.x src/ScheduledTransitionsPermissions.php \Drupal\scheduled_transitions\ScheduledTransitionsPermissions::viewScheduledTransitionsPermission()

Creates a permission for viewing new scheduled transitions for a bundle.

Parameters

string $entityTypeId: An entity type ID.

string $bundle: A bundle ID.

Return value

string Permission ID for this bundle.

6 calls to ScheduledTransitionsPermissions::viewScheduledTransitionsPermission()
ScheduledTransitionEntityTransitionsFormTest::testTransitionsByPageLanguage in tests/src/Functional/ScheduledTransitionEntityTransitionsFormTest.php
Tests transitions appear on list according to page context language.
ScheduledTransitionsEntityHooks::entityAccess in src/ScheduledTransitionsEntityHooks.php
Implements hook_entity_access().
ScheduledTransitionSettingsFormTest::testNoPermissionsMessage in tests/src/Functional/ScheduledTransitionSettingsFormTest.php
Tests permission message on form.
ScheduledTransitionsPermissions::permissions in src/ScheduledTransitionsPermissions.php
Generate dynamic permissions.
ScheduledTransitionsPermissionsUnitTest::testViewScheduledTransitionsPermission in tests/src/Unit/ScheduledTransitionsPermissionsUnitTest.php
Tests result of permission function.

... See full list

File

src/ScheduledTransitionsPermissions.php, line 128

Class

ScheduledTransitionsPermissions
Generates permissions for host entity types for scheduled transitions.

Namespace

Drupal\scheduled_transitions

Code

public static function viewScheduledTransitionsPermission(string $entityTypeId, string $bundle) : string {
  return sprintf('view scheduled transitions %s %s', $entityTypeId, $bundle);
}