You are here

public function WebformResultsClearForm::getWarning in Webform 8.5

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

Returns warning message to display.

Return value

array A renderable array containing a warning message.

Overrides WebformDeleteFormBase::getWarning

File

src/Form/WebformResultsClearForm.php, line 49

Class

WebformResultsClearForm
Webform for webform results clear webform.

Namespace

Drupal\webform\Form

Code

public function getWarning() {
  $t_args = [
    '%label' => $this
      ->getLabel(),
  ];
  return [
    '#type' => 'webform_message',
    '#message_type' => 'warning',
    '#message_message' => $this
      ->t('Are you sure you want to clear all %label submissions?', $t_args) . '<br/>' . '<strong>' . $this
      ->t('This action cannot be undone.') . '</strong>',
  ];
}