Development

/plugins/sfDoctrinePlugin/trunk/data/generator/sfDoctrineModule/admin/parts/deleteAction.php

You must first sign up to be able to contribute.

root/plugins/sfDoctrinePlugin/trunk/data/generator/sfDoctrineModule/admin/parts/deleteAction.php

Revision 13490, 425 bytes (checked in by fabien, 5 years ago)

[1.2] fixed CSRF problem with CRUD and admin generator (closes #4915)

Line 
1   public function executeDelete(sfWebRequest $request)
2   {
3     $request->checkCSRFProtection();
4
5     $this->dispatcher->notify(new sfEvent($this, 'admin.delete_object', array('object' => $this->getRoute()->getObject())));
6
7     $this->getRoute()->getObject()->delete();
8
9     $this->getUser()->setFlash('notice', 'The item was deleted successfully.');
10
11     $this->redirect('@<?php echo $this->getUrlForAction('list') ?>');
12   }
13
Note: See TracBrowser for help on using the browser.