mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-03 05:23:49 +00:00
Fixed: [scope] api, picker and admin form consider 'active' property
* add active field in admin scope form * issue: https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/675
This commit is contained in:
16
src/Bundle/ChillMainBundle/Controller/ScopeApiController.php
Normal file
16
src/Bundle/ChillMainBundle/Controller/ScopeApiController.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\ApiController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class ScopeApiController extends ApiController
|
||||
{
|
||||
protected function customizeQuery(string $action, Request $request, $query): void
|
||||
{
|
||||
if ('_index' === $action) {
|
||||
$query->andWhere($query->expr()->eq('e.active', "'TRUE'"));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user