|
|
|
|
|
|
|
|
$dqlFilter = sprintf(str_replace('currentMerchant', $this->getUser()->getMerchant()->getId(), $dqlFilter)); |
|
|
$dqlFilter = sprintf(str_replace('currentMerchant', $this->getUser()->getMerchant()->getId(), $dqlFilter)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ($pos = strpos($dqlFilter, 'NOW()')) { |
|
|
|
|
|
|
|
|
if ($pos = strpos($dqlFilter, 'TODAYSTART')) { |
|
|
$date = new \DateTime(); |
|
|
$date = new \DateTime(); |
|
|
$dqlFilter = sprintf(str_replace('NOW()', $date->format('Y-m-d H:i:s'), $dqlFilter)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$dqlFilter = sprintf(str_replace('TODAYSTART', $date->format('Y-m-d').' 00:00:00', $dqlFilter)); |
|
|
|
|
|
} |
|
|
|
|
|
if ($pos = strpos($dqlFilter, 'TODAYEND')) { |
|
|
|
|
|
$date = new \DateTime(); |
|
|
|
|
|
$dqlFilter = sprintf(str_replace('TODAYEND', $date->format('Y-m-d').' 23:59:59', $dqlFilter)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ($pos = strpos($dqlFilter, 'sectionLunch')) { |
|
|
if ($pos = strpos($dqlFilter, 'sectionLunch')) { |
|
|
$dqlFilter = sprintf(str_replace('sectionLunch', $this->sectionUtils->getSection('lunch')->getId(), $dqlFilter)); |
|
|
$dqlFilter = sprintf(str_replace('sectionLunch', $this->sectionUtils->getSection('lunch')->getId(), $dqlFilter)); |
|
|
} else if ($pos = strpos($dqlFilter, 'sectionMarket')) { |
|
|
} else if ($pos = strpos($dqlFilter, 'sectionMarket')) { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//TODO déplacer dans LC |
|
|
|
|
|
if($this->entity['name']== 'OrderShopLunch' || $this->entity['name']== 'OrderShopLunchDay'){ |
|
|
|
|
|
$queryBuilder->addOrderBy('entity.user', 'asc'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return $queryBuilder; |
|
|
return $queryBuilder; |
|
|
} |
|
|
} |
|
|
|
|
|
|