You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 3 година
пре 3 година
пре 3 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\Ticket;
  3. use Lc\CaracoleBundle\Repository\MerchantStoreTrait;
  4. use Lc\SovBundle\Repository\Ticket\TicketStore as SovTicketStore;
  5. class TicketStore extends SovTicketStore
  6. {
  7. use MerchantStoreTrait;
  8. public function getByUser($user, $query = null): array
  9. {
  10. if (is_null($query)) {
  11. $query = $this->query->create();
  12. }
  13. if ($this->merchant) {
  14. $query->filterByMerchant($this->merchant);
  15. }
  16. return parent::getByUser($user, $query);
  17. }
  18. public function getAllOpen(int $limit = 0, $query = null): array
  19. {
  20. if (is_null($query)) {
  21. $query = $this->query->create();
  22. }
  23. if ($this->merchant) {
  24. $query->filterByMerchant($this->merchant);
  25. }
  26. return parent::getAllOpen($limit, $query);
  27. }
  28. public function countAllOpen($query = null): string
  29. {
  30. if (is_null($query)) {
  31. $query = $this->query->create();
  32. }
  33. if ($this->merchant) {
  34. $query->filterByMerchant($this->merchant);
  35. }
  36. return parent::countAllOpen($query);
  37. }
  38. }