mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-01-04 08:21:22 +00:00
Start implementation of filter within admin index pages
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Controller\SocialWork;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\CRUDController;
|
||||
use Chill\MainBundle\Pagination\PaginatorInterface;
|
||||
use Chill\MainBundle\Templating\Listing\FilterOrderHelper;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class ResultController extends CRUDController
|
||||
@@ -23,4 +24,13 @@ class ResultController extends CRUDController
|
||||
|
||||
return parent::orderQuery($action, $query, $request, $paginator);
|
||||
}
|
||||
|
||||
protected function buildFilterOrderHelper(string $action, Request $request): ?FilterOrderHelper
|
||||
{
|
||||
return $this->getFilterOrderHelperFactory()
|
||||
->create(self::class)
|
||||
->addSearchBox(['label'])
|
||||
->addCheckbox('activeFilter', [true => 'Active', false => 'Inactive'], ['Active'])
|
||||
->build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user