-
-
Save muspelheim/6e762200ec6be1c490a29187b0d68610 to your computer and use it in GitHub Desktop.
Disable soft DoctrineExtensions' SoftDeleteable in Sonata Admin list view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
class BlablaAdmin extends Admin | |
{ | |
... | |
public function createQuery($context = 'list') | |
{ | |
$query = parent::createQuery($context); | |
$em = $query->getQueryBuilder()->getEntityManager(); | |
$em->getFilters()->disable('softdeleteable'); | |
return $query; | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment