You are here

protected function MailingListConfirmPermissions::buildPermissions in Mailing List 8

Returns a list of mailing list permissions for a given list.

Parameters

\Drupal\mailing_list\Entity\MailingList $list: The mailing list.

Return value

array An associative array of permission names and descriptions.

1 call to MailingListConfirmPermissions::buildPermissions()
MailingListConfirmPermissions::bypassConfirmPermissions in mailing_list_confirm/src/MailingListConfirmPermissions.php
Returns an array of mailing list confirm permissions.

File

mailing_list_confirm/src/MailingListConfirmPermissions.php, line 42

Class

MailingListConfirmPermissions
Provides dynamic confirm permissions for each mailing list.

Namespace

Drupal\mailing_list_confirm

Code

protected function buildPermissions(MailingList $list) {
  $list_id = $list
    ->id();
  $list_params = [
    '%list_name' => $list
      ->label(),
  ];
  return [
    "bypass {$list_id} mailing list subscription confirm" => [
      'title' => $this
        ->t('Bypass %list_name mailing list subscription confirm', $list_params),
    ],
  ];
}