Skip to content

Instantly share code, notes, and snippets.

@kbsali
Created April 22, 2014 14:56
Show Gist options
  • Save kbsali/11182450 to your computer and use it in GitHub Desktop.
Save kbsali/11182450 to your computer and use it in GitHub Desktop.
Disable soft DoctrineExtensions' SoftDeleteable in Sonata Admin list view
<?php
...
class BlablaAdmin extends Admin
{
...
public function createQuery($context = 'list')
{
$query = parent::createQuery($context);
$em = $query->getQueryBuilder()->getEntityManager();
$em->getFilters()->disable('softdeleteable');
return $query;
}
...
}
@webdevilopers
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment