You are here

public function WebformResultsClearForm::getDescription in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Form/WebformResultsClearForm.php \Drupal\webform\Form\WebformResultsClearForm::getDescription()

Returns additional text to display as a description.

Return value

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

Overrides WebformDeleteFormBase::getDescription

File

src/Form/WebformResultsClearForm.php, line 62

Class

WebformResultsClearForm
Webform for webform results clear webform.

Namespace

Drupal\webform\Form

Code

public function getDescription() {
  $submission_total = $this
    ->getSubmissionTotal();
  $t_args = [
    '%label' => $this
      ->getLabel(),
    '@total' => $submission_total,
    '@submissions' => $this
      ->formatPlural($submission_total, 'submission', 'submissions'),
  ];
  return [
    'title' => [
      '#markup' => $this
        ->t('This action will…'),
    ],
    'list' => [
      '#theme' => 'item_list',
      '#items' => [
        $this
          ->t('Remove @total %label @submissions', $t_args),
        [
          '#markup' => '<em>' . $this
            ->t('Take a few minutes to complete') . '</em>',
        ],
      ],
    ],
  ];
}