Guest User

Untitled

a guest
Oct 20th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. <?php
  2. public function filterByPhone($value)
  3. {
  4. return $this->usePlacePhoneQuery()
  5. ->filterByPhone($value)
  6. ->endUse();
  7.  
  8. }
  9.  
  10. public function filterByEmail($value)
  11. {
  12. return $this->usePlaceEmailQuery()
  13. ->filterByEmail($value)
  14. ->endUse();
  15. }
  16.  
  17. public function filterByTitle($value)
  18. {
  19. return $this->usePlaceI18nQuery()
  20. ->filterByTitle($value)
  21. ->groupBy("Id")
  22. ->endUse();
  23. }
  24.  
  25. public function filterByCountry($value)
  26. {
  27. return $this->useCityQuery()
  28. ->filterByCountryId($value)
  29. ->endUse();
  30. }
  31.  
  32. public function filterByIsPaid($value)
  33. {
  34. if (1 == $value)
  35. {
  36. return $this
  37. ->usePlacePaymentQuery()
  38. ->groupBy('PlacePayment.PlaceId')
  39. ->having("COUNT(place_payment.id) > 0")
  40. ->endUse();
  41. }
  42. else
  43. {
  44. return $this
  45. ->leftJoinPlacePayment()
  46. ->groupBy('Place.Id')
  47. ->having("COUNT(place_payment.id) = 0");
  48. }
  49. }
  50. ?>
Add Comment
Please, Sign In to add comment