You are here

public function SimpleAccessPermissions::nodeTypePermissions in Simple Access 8.3

Returns an array of node type permissions.

Return value

array The node type permissions. @see \Drupal\user\PermissionHandlerInterface::getPermissions()

1 string reference to 'SimpleAccessPermissions::nodeTypePermissions'
simple_access.permissions.yml in ./simple_access.permissions.yml
simple_access.permissions.yml

File

src/SimpleAccessPermissions.php, line 20

Class

SimpleAccessPermissions

Namespace

Drupal\simple_access

Code

public function nodeTypePermissions() {
  $perms = [];

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