You are here

public function WebformUiElementDeleteForm::getWarning in Webform 8.5

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

Returns warning message to display.

Return value

array A renderable array containing a warning message.

Overrides WebformDeleteFormBase::getWarning

File

modules/webform_ui/src/Form/WebformUiElementDeleteForm.php, line 124

Class

WebformUiElementDeleteForm
Webform for deleting a webform element.

Namespace

Drupal\webform_ui\Form

Code

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