public function findSeasonByPerimeterAndDateTime(Perimeter $perimeter, \DateTime $dateTime)
    {
        $query = $this->getEntityManager()->createQueryBuilder()
                    ->select("s.id")
                    ->from("CanalTPMttBundle:Season", "s")
                    ->where("s.published = TRUE")
                    ->andWhere("s.perimeter = '".$perimeter->getId()."'")
                    ->andWhere("s.startDate <= '".$dateTime->format("Y-m-d H:i:s")."'")
                    ->andWhere("s.endDate >= '".$dateTime->format("Y-m-d H:i:s")."'")
                    ->getQuery();

        return $query->getResult();
    }
public function findSeasonByPerimeterAndDateTime(Perimeter $perimeter, \DateTime $dateTime)
    {
        $query = $this->getEntityManager()->createQueryBuilder()
                    ->select("s.id")
                    ->from("CanalTPMttBundle:Season", "s")
                    ->where("s.published = TRUE")
                    ->andWhere("s.perimeter = '".$perimeter->getId()."'")
                    ->andWhere("s.startDate <= '".$dateTime->format("Y-m-d H:i:s")."'")
                    ->andWhere("s.endDate >= '".$dateTime->format("Y-m-d H:i:s")."'")
                    ->getQuery();

        return $query->getResult();
    }
public function findSeasonByPerimeterAndDateTime ( Perimeter $ perimeter , \ DateTime $ dateTime ) { $ query = $ this -> getEntityManager ( ) -> createQueryBuilder ( ) -> select ( "s.id" ) -> from ( "CanalTPMttBundle:Season" , "s" ) -> where ( "s.published = TRUE" ) -> andWhere ( "s.perimeter = '" . $ perimeter -> getId ( ) . "'" ) -> andWhere ( "s.startDate <= '" . $ dateTime -> format ( "Y-m-d H:i:s" ) . "'" ) -> andWhere ( "s.endDate >= '" . $ dateTime -> format ( "Y-m-d H:i:s" ) . "'" ) -> getQuery ( ) ; return $ query -> getResult ( ) ; }
used by webservice
used by webservice