You are here

public function MailingListConfirmPermissions::bypassConfirmPermissions in Mailing List 8

Returns an array of mailing list confirm permissions.

Return value

array The mailing list confirm permissions.

1 string reference to 'MailingListConfirmPermissions::bypassConfirmPermissions'
mailing_list_confirm.permissions.yml in mailing_list_confirm/mailing_list_confirm.permissions.yml
mailing_list_confirm/mailing_list_confirm.permissions.yml

File

mailing_list_confirm/src/MailingListConfirmPermissions.php, line 23

Class

MailingListConfirmPermissions
Provides dynamic confirm permissions for each mailing list.

Namespace

Drupal\mailing_list_confirm

Code

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

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