I would like to use the SoftDeleteable behavior extension for Doctrine2 in my Symfony2 application to hide deactivated users and entities related to them. This is great and simple solution for the frontend, but I would like to disable this filter for the administration section to make it possible to re-enable these entities. The admin section is located in a separate bundle.
The documentation says it is as easy to disable this filter as writing this line before querying the repository:
$em->getFilters()->disable('soft-deleteable');
Now I would like to ask if there is any way to disable this behaviour for the whole admin bundle to make unsetting this filter for every related controller action unnecessary.
Thank you.
You detect bundle name and decide, whether to enable or disable filter.
If you wonder where to perform enabling/disabling, check this answer