You are here

private function MandrillAdminSettingsForm::getPluginLabel in Mandrill 8

Get the label for a mail plugin.

Parameters

string $plugin_id:

Return value

string

1 call to MandrillAdminSettingsForm::getPluginLabel()
MandrillAdminSettingsForm::buildForm in src/Form/MandrillAdminSettingsForm.php
.

File

src/Form/MandrillAdminSettingsForm.php, line 331

Class

MandrillAdminSettingsForm
Implements an Mandrill Admin Settings form.

Namespace

Drupal\mandrill\Form

Code

private function getPluginLabel($plugin_id) {
  $definition = $this->mailManager
    ->getDefinition($plugin_id);
  if (isset($definition['label'])) {
    $plugin_label = $definition['label'];
  }
  else {
    $plugin_label = $this
      ->t('Unknown Plugin (%id)', [
      '%id' => $plugin_id,
    ]);
  }
  return $plugin_label;
}