You are here

public function NodeOptionPremiumPermissions::nodeTypePermissions in Node Option Premium 8

Returns an array of node type permissions.

Return value

array The node type permissions.

See also

\Drupal\user\PermissionHandlerInterface::getPermissions()

1 string reference to 'NodeOptionPremiumPermissions::nodeTypePermissions'
nopremium.permissions.yml in ./nopremium.permissions.yml
nopremium.permissions.yml

File

src/NodeOptionPremiumPermissions.php, line 23

Class

NodeOptionPremiumPermissions
Provides dynamic permissions for nodes of different types for promoted.

Namespace

Drupal\nopremium

Code

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

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