Skip to content
This repository has been archived by the owner on Apr 21, 2018. It is now read-only.

Latest commit

 

History

History
90 lines (66 loc) · 1.38 KB

DeleteAction.md

File metadata and controls

90 lines (66 loc) · 1.38 KB

Delete action

This methods implements a simple, but usefull object delete action.

Api

/**
 * @param  Request                   $request
 * @param  int                       $id
 * @return Response|RedirectResponse
 */
public function crudDeleteObject(Request $request, $id)

Overwrites

Facultative

Delete route

This method defines the delete route name

/**
 * @return string
 */
protected function crudDeleteRoute()

Delete is granted

This methods return if its allowed to call this object delete action.

/**
 * @param object
 * @return bool
 */
protected function crudDeleteIsGranted($object)

Delete role

This method defines the delete role (for security check).

/**
 * @return string
 */
protected function crudDeleteRole()

Delete Redirect url

This method defines the redirect url after delete object

/**
 * @param object
 * @return string
 */
protected function crudDeleteRedirectUrl($object)

Hooks

Delete pre persist

This method allows to manipulate the object before remove

/**
 * @param  object $object
 * @return void
 */
protected function crudDeletePreRemove($object)

Delete post flush

This method allows to manipulate the object after flush

/**
 * @param  object $object
 * @return void
 */
protected function crudDeletePostFlush($object)