You are here

public function HostDeleteForm::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/HostDeleteForm.php, line 75

Class

HostDeleteForm
Provides a form for deleting (and unbanning) a host entity.

Namespace

Drupal\httpbl\Form

Code

public function getQuestion() {
  if ($this->banManager
    ->isBanned($this->entity
    ->label())) {
    return $this
      ->t('Are you sure you want to delete and unban evaluated host %name?', array(
      '%name' => $this->entity
        ->label(),
    ));
  }
  else {
    return $this
      ->t('Are you sure you want to delete evaluated host %name?', array(
      '%name' => $this->entity
        ->label(),
    ));
  }
}