[Sloved]Soft-delete plugin muffin/trash anyone use this plugin

How can i use Extras method, called in controller


  • emptyTrash() - permanently deletes all trashed records.
  • restoreTrash($entity = null, array $options = []) - restores one (or all) trashed records.
  • cascadingRestoreTrash($entity = null, array $options = []) - restores one (or all) trashed records including those of dependent associations.
  • trash($entity, array $options = []) - like delete() but for a soft-delete (handy when Model.beforeDelete is disabled by default).
  • trashAll(array $conditions) - like deleteAll() but for soft-deletes.

Is it need define EventListener class so that i can call the all the methods define in behavoir will call from controller or model level anyone work on event system.