mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-17 07:44:24 +00:00
18 lines
530 B
PHP
18 lines
530 B
PHP
<?php
|
|
|
|
namespace Chill\PersonBundle\Controller;
|
|
|
|
use Chill\MainBundle\CRUD\Controller\ApiController;
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
|
class OpeningApiController extends ApiController
|
|
{
|
|
protected function customizeQuery(string $action, Request $request, $qb): void
|
|
{
|
|
$qb->where($qb->expr()->gt('e.noActiveAfter', ':now'))
|
|
->orWhere($qb->expr()->isNull('e.noActiveAfter'));
|
|
$qb->setParameter('now', new \DateTime('now'));
|
|
}
|
|
}
|