You are here

public function WebformHandlerDeleteForm::getWarning in Webform 6.x

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

Returns warning message to display.

Return value

array A renderable array containing a warning message.

Overrides WebformDeleteFormBase::getWarning

File

src/Form/WebformHandlerDeleteForm.php, line 49

Class

WebformHandlerDeleteForm
Form for deleting a webform handler.

Namespace

Drupal\webform\Form

Code

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