src/Entrepreneurs/Bundle/AppBundle/Propel/PeriodeInterventionQuery.php line 8

Open in your IDE?
  1. <?php
  2. namespace Entrepreneurs\Bundle\AppBundle\Propel;
  3. use Entrepreneurs\Bundle\AppBundle\Propel\Base\PeriodeInterventionQuery as BasePeriodeInterventionQuery;
  4. use Propel\Runtime\ActiveQuery\Criteria;
  5. class PeriodeInterventionQuery extends BasePeriodeInterventionQuery
  6. {
  7.     /**
  8.      * @throws \Exception
  9.      */
  10.     public function filterByDateDebut($dateDebut null$comparison Criteria::GREATER_EQUAL): self
  11.     {
  12.         if (!$dateDebut) {
  13.             return $this;
  14.         }
  15.         if ($dateDebut instanceof \DateTime) {
  16.             $dateDebut = clone $dateDebut;
  17.         } else {
  18.             $dateDebut = new \DateTime($dateDebut);
  19.         }
  20.         $dateDebut->setTime(00);
  21.         return parent::filterByDateDebut($dateDebut$comparison);
  22.     }
  23.     /**
  24.      * @throws \Exception
  25.      */
  26.     public function filterByDateFin($dateFin null$comparison Criteria::LESS_EQUAL): self
  27.     {
  28.         if (!$dateFin) {
  29.             return $this;
  30.         }
  31.         if ($dateFin instanceof \DateTime) {
  32.             $dateFin = clone $dateFin;
  33.         } else {
  34.             $dateFin = new \DateTime($dateFin);
  35.         }
  36.         $dateFin->setTime(235959);
  37.         return parent::filterByDateFin($dateFin$comparison);
  38.     }
  39. }