mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 22:04:23 +00:00
22 lines
628 B
PHP
22 lines
628 B
PHP
<?php
|
|
|
|
namespace Chill\PersonBundle\Controller;
|
|
|
|
use Chill\MainBundle\CRUD\Controller\ApiController;
|
|
use Chill\MainBundle\Pagination\PaginatorInterface;
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
|
|
class SocialIssueApiController extends ApiController
|
|
{
|
|
protected function customizeQuery(string $action, Request $request, $query): void
|
|
{
|
|
$query->where(
|
|
$query->expr()->orX(
|
|
$query->expr()->gt('e.desactivationDate', ':now'),
|
|
$query->expr()->isNull('e.desactivationDate')
|
|
)
|
|
);
|
|
$query->setParameter('now', new \DateTimeImmutable());
|
|
}
|
|
}
|