public function WebformDeleteMultipleFormBase::getWarning in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Form/WebformDeleteMultipleFormBase.php \Drupal\webform\Form\WebformDeleteMultipleFormBase::getWarning()
Returns warning message to display.
1 call to WebformDeleteMultipleFormBase::getWarning()
- WebformDeleteMultipleFormBase::buildForm in src/
Form/ WebformDeleteMultipleFormBase.php - Form constructor.
File
- src/
Form/ WebformDeleteMultipleFormBase.php, line 79
Class
- WebformDeleteMultipleFormBase
- Provides an entities deletion confirmation form.
Namespace
Drupal\webform\FormCode
public function getWarning() {
$message = $this
->formatPlural(count($this->selection), 'Are you sure you want to delete this @item?', 'Are you sure you want to delete these @items?', [
'@item' => $this->entityType
->getSingularLabel(),
'@items' => $this->entityType
->getPluralLabel(),
]);
return [
'#type' => 'webform_message',
'#message_type' => 'warning',
'#message_message' => $message,
'#weight' => -10,
];
}