You are here

public function MailingListPermissions::mailListPermissions in Mailing List 8

Returns an array of mailing list permissions.

Return value

array The mailing list type permissions.

1 string reference to 'MailingListPermissions::mailListPermissions'
mailing_list.permissions.yml in ./mailing_list.permissions.yml
mailing_list.permissions.yml

File

src/MailingListPermissions.php, line 23

Class

MailingListPermissions
Provides dynamic permissions for each mailing list.

Namespace

Drupal\mailing_list

Code

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

  // Generate mailing list permissions for each list.
  foreach (MailingList::loadMultiple() as $list) {
    $perms += $this
      ->buildPermissions($list);
  }
  return $perms;
}