You are here

public static function ScheduledTransitionsPermissions::addScheduledTransitionsPermission in Scheduled Transitions 8

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

Creates a permission for creating 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::addScheduledTransitionsPermission()
ScheduledTransitionModalFormTest::testLatestOptionPreselected in tests/src/Functional/ScheduledTransitionModalFormTest.php
Test by default the latest revision radio is prechecked.
ScheduledTransitionModalFormTest::testRevisionLogHtml in tests/src/Functional/ScheduledTransitionModalFormTest.php
Tests revision logs.
ScheduledTransitionsEntityHooks::entityAccess in src/ScheduledTransitionsEntityHooks.php
Implements hook_entity_access().
ScheduledTransitionsPermissions::permissions in src/ScheduledTransitionsPermissions.php
Generate dynamic permissions.
ScheduledTransitionsPermissionsUnitTest::testAddScheduledTransitionsPermission in tests/src/Unit/ScheduledTransitionsPermissionsUnitTest.php
Tests result of permission function.

... See full list

File

src/ScheduledTransitionsPermissions.php, line 143

Class

ScheduledTransitionsPermissions
Generates permissions for host entity types for scheduled transitions.

Namespace

Drupal\scheduled_transitions

Code

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