You are here

public function Permissions::get in Block Content Permissions 8

Gets permissions.

Return value

array Array of permissions.

1 string reference to 'Permissions::get'
block_content_permissions.permissions.yml in ./block_content_permissions.permissions.yml
block_content_permissions.permissions.yml

File

src/Permissions.php, line 22

Class

Permissions
Provides dynamic permissions for the block content permissions module.

Namespace

Drupal\block_content_permissions

Code

public function get() {
  $permissions = [];

  // Generate permissions for all block content types.
  foreach (BlockContentType::loadMultiple() as $type) {
    $permissions += $this
      ->buildPermissions($type);
  }
  return $permissions;
}