You are here

public function Permissions::get in Block Access 8

Gets permissions.

Return value

array Array of permissions as per permissions.yml format.

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

File

src/Permissions.php, line 22

Class

Permissions
Defines a class for generating block content permissions per type.

Namespace

Drupal\block_access

Code

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

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