Permalink
Browse files

Allow soft-deleted items to display in certain backend requests.

This setup in the sandbox but not functioning
  • Loading branch information...
1 parent b109113 commit 9638ceb290f72c2f3a61ba169f025447b566b583 @mykehsd committed Mar 22, 2013
Showing with 8 additions and 0 deletions.
  1. +5 −0 Controller/Configuration.php
  2. +3 −0 Controller/ResourceController.php
@@ -168,6 +168,11 @@ public function getLimit()
return (int) $this->get('_limit', 10);
}
+ public function getDeleted()
+ {
+ return $this->request->get('deleted', false);
+ }
+
public function isSortable()
{
return (Boolean) $this->get('_sortable', false);
@@ -65,6 +65,9 @@ public function indexAction(Request $request)
$pluralName = $config->getPluralResourceName();
+ if ($config->getDeleted())
+ $this->getManager()->getFilters()->disable('softdeleteable');
+
if ($config->isPaginated()) {
$resources = $this
->getRepository()

0 comments on commit 9638ceb

Please sign in to comment.