You are here

public function ContactPermissions::ContactTypePermissions in RedHen CRM 8

Returns an array of RedHen contact type permissions.

Return value

array Returns an array of permissions.

1 string reference to 'ContactPermissions::ContactTypePermissions'
redhen_contact.permissions.yml in modules/redhen_contact/redhen_contact.permissions.yml
modules/redhen_contact/redhen_contact.permissions.yml

File

modules/redhen_contact/src/ContactPermissions.php, line 18

Class

ContactPermissions

Namespace

Drupal\redhen_contact

Code

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

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