You are here

public function ConnectionPermissions::ConnectionTypePermissions in RedHen CRM 8

Returns an array of RedHen Connection type permissions.

Return value

array Returns an array of permissions.

1 string reference to 'ConnectionPermissions::ConnectionTypePermissions'
redhen_connection.permissions.yml in modules/redhen_connection/redhen_connection.permissions.yml
modules/redhen_connection/redhen_connection.permissions.yml

File

modules/redhen_connection/src/ConnectionPermissions.php, line 18

Class

ConnectionPermissions

Namespace

Drupal\redhen_connection

Code

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

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