You are here

public function HostMultipleBanConfirm::getQuestion in http:BL 8

Returns the question to ask the user.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup The form question. The page title will be set to this value.

Overrides ConfirmFormInterface::getQuestion

File

src/Form/HostMultipleBanConfirm.php, line 110

Class

HostMultipleBanConfirm
Provides a multiple host blacklisting and banning confirmation form.

Namespace

Drupal\httpbl\Form

Code

public function getQuestion() {
  $banningEnabled = TRUE ? \Drupal::state()
    ->get('httpbl.storage') == HTTPBL_DB_HH_DRUPAL : ($banningEnabled = FALSE);
  if ($banningEnabled) {
    return $this
      ->formatPlural(count($this->hostInfo), 'Are you sure you want to blacklist and ban this host?', 'Are you sure you want to blacklist and ban these hosts?');
  }
  else {
    return $this
      ->formatPlural(count($this->hostInfo), 'Are you sure you want to blacklist this host?', 'Are you sure you want to blacklist these hosts?');
  }
}