Skip to content

Commit

Permalink
Update softdeleteable.md
Browse files Browse the repository at this point in the history
Missing enable/disable within Doctrine ODM
  • Loading branch information
stephandesouza committed Mar 11, 2014
1 parent 417e3cb commit fab490d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/softdeleteable.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ $em->getFilters()->enable('soft-deleteable');
$em->getFilters()->disable('soft-deleteable');
```

Or from your DocumentManager (ODM):

``` php
// This will enable the SoftDeleteable filter, so entities which were "soft-deleted" will not appear
// in results
// You should adapt the filter name to your configuration (ex: softdeleteable)
$em->getFilterCollection()->enable('soft-deleteable');

// This will disable the SoftDeleteable filter, so entities which were "soft-deleted" will appear in results
$em->getFilterCollection()->disable('soft-deleteable');
```

**NOTE:** by default all filters are disabled, so you must explicitly enable **soft-deleteable** filter in your setup
or whenever you need it.

Expand Down

0 comments on commit fab490d

Please sign in to comment.