public function PushNotificationsTokenDeleteForm::submitForm in Push Notifications 8
Delete the entity and log the event
Overrides ContentEntityForm::submitForm
File
- src/
Form/ PushNotificationsTokenDeleteForm.php, line 47 - Contains \Drupal\push_notifications\Form\PushNotificationsTokenDeleteForm.
Class
- PushNotificationsTokenDeleteForm
- Provides a form for deleting a push_notifications_token entity.
Namespace
Drupal\push_notifications\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$entity = $this
->getEntity();
$entity
->delete();
\Drupal::logger('push_notifications')
->notice('Deleted %title push notifications device token', array(
'%title' => $this->entity
->label(),
));
$form_state
->setRedirect('push_notifications.token.collection');
}