public function WebformSubmissionDeleteForm::getWarning in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Form/WebformSubmissionDeleteForm.php \Drupal\webform\Form\WebformSubmissionDeleteForm::getWarning()
Returns warning message to display.
Return value
array A renderable array containing a warning message.
Overrides WebformDeleteFormInterface::getWarning
1 call to WebformSubmissionDeleteForm::getWarning()
- WebformSubmissionDeleteForm::buildForm in src/
Form/ WebformSubmissionDeleteForm.php - Form constructor.
File
- src/
Form/ WebformSubmissionDeleteForm.php, line 104
Class
- WebformSubmissionDeleteForm
- Provides a confirmation webform for deleting a webform submission.
Namespace
Drupal\webform\FormCode
public function getWarning() {
$t_args = [
'@entity-type' => $this
->getEntity()
->getEntityType()
->getSingularLabel(),
'%label' => $this
->getEntity()
->label(),
];
return [
'#type' => 'webform_message',
'#message_type' => 'warning',
'#message_message' => $this
->t('Are you sure you want to delete the %label @entity-type?', $t_args) . '<br/>' . '<strong>' . $this
->t('This action cannot be undone.') . '</strong>',
];
}