You are here

public function HostDeleteForm::getDescription in http:BL 8

Returns additional text to display as a description.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup The form description.

Overrides ContentEntityConfirmFormBase::getDescription

File

src/Form/HostDeleteForm.php, line 88

Class

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

Namespace

Drupal\httpbl\Form

Code

public function getDescription() {
  if ($this->banManager
    ->isBanned($this->entity
    ->label())) {
    return $this
      ->t('This evaluated host is also banned (Drupal core Ban).  If deleted it will be unbanned. This action cannot be undone.');
  }
  return $this
    ->t('This action cannot be undone.');
}