function EntityTestPermissions::entityTestBundlePermissions

Same name in other branches
  1. 9 core/modules/system/tests/modules/entity_test/src/EntityTestPermissions.php \Drupal\entity_test\EntityTestPermissions::entityTestBundlePermissions()
  2. 8.9.x core/modules/system/tests/modules/entity_test/src/EntityTestPermissions.php \Drupal\entity_test\EntityTestPermissions::entityTestBundlePermissions()
  3. 11.x core/modules/system/tests/modules/entity_test/src/EntityTestPermissions.php \Drupal\entity_test\EntityTestPermissions::entityTestBundlePermissions()

Returns an array of entity_test_bundle permissions.

Return value

array An array of entity_test_bundle permissions. @see \Drupal\user\PermissionHandlerInterface::getPermissions()

1 string reference to 'EntityTestPermissions::entityTestBundlePermissions'
entity_test.permissions.yml in core/modules/system/tests/modules/entity_test/entity_test.permissions.yml
core/modules/system/tests/modules/entity_test/entity_test.permissions.yml

File

core/modules/system/tests/modules/entity_test/src/EntityTestPermissions.php, line 22

Class

EntityTestPermissions
Provides dynamic permissions for entity test.

Namespace

Drupal\entity_test

Code

public function entityTestBundlePermissions() {
    $perms = [];
    // Generate permissions for all EntityTestBundle bundles.
    foreach (EntityTestBundle::loadMultiple() as $type) {
        $perms += $this->buildPermissions($type);
    }
    return $perms;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.