public function PushNotificationDeleteForm::submitForm in Push Notifications 8
Delete the entity and log the event. logger() replaces the watchdog.
Overrides ContentEntityForm::submitForm
File
- src/
Form/ PushNotificationDeleteForm.php, line 48 - Contains Drupal\push_notifications\Form\PushNotificationDeleteForm.
Class
- PushNotificationDeleteForm
- Provides a form for deleting a push_notification entity.
Namespace
Drupal\push_notifications\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$entity = $this
->getEntity();
$entity
->delete();
$this
->logger('push_notifications')
->notice('@type: deleted %title.', array(
'@type' => $this->entity
->bundle(),
'%title' => $this->entity
->label(),
));
$form_state
->setRedirect('entity.push_notification.collection');
}