You are here

public function PrepareHttpblEntityUninstallForm::getDescription in http:BL 8

Returns additional text to display as a description.

Return value

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

Overrides PrepareModulesEntityUninstallForm::getDescription

File

src/Form/PrepareHttpblEntityUninstallForm.php, line 77

Class

PrepareHttpblEntityUninstallForm
Provides a form removing httpbl content entities data before uninstallation.

Namespace

Drupal\httpbl\Form

Code

public function getDescription() {
  $check_link = Link::fromTextAndUrl(t('Please ensure all Http:BL Blocking is disabled'), Url::fromRoute('httpbl.admin_config'))
    ->toString();
  $blacklist_report_link = Link::fromTextAndUrl(t('Http:BL blacklisted hosts'), Url::fromRoute('view.evaluated_hosts.page_banned'))
    ->toString();

  // @see for the clue to this route.  http://drupal.stackexchange.com/questions/223405/how-to-get-route-name-of-a-view-page
  $message = $this
    ->t('@check (otherwise new entities will be created during the process of deleting them).<br />', [
    '@check' => $check_link,
  ]);
  $message .= $this
    ->t('This action affects two tables <strong>(httpbl_host and ban_ip)</strong> and cannot be undone.<br />');
  $message .= $this
    ->t('Any blacklisted hosts in Http:BL will also be removed from Ban if found there.<br />');
  $message .= $this
    ->t('You can preview all @blacklisted here.  These will be un-banned.<br />', [
    '@blacklisted' => $blacklist_report_link,
  ]);
  $message .= $this
    ->t('Make a backup of your database if you want to be able to restore these items.');
  return $message;
}