|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
-
- namespace Lc\CaracoleBundle\Repository\Ticket;
-
- use Lc\CaracoleBundle\Repository\MerchantStoreTrait;
- use Lc\SovBundle\Repository\Ticket\TicketStore as SovTicketStore;
-
- class TicketStore extends SovTicketStore
- {
- use MerchantStoreTrait;
-
- public function getByUser($user, $query = null): array
- {
- if (is_null($query)) {
- $query = $this->query->create();
- }
-
- if ($this->merchant) {
- $query->filterByMerchant($this->merchant);
- }
-
- return parent::getByUser($user, $query);
- }
-
- public function getAllOpen(int $limit = 0, $query = null): array
- {
- if (is_null($query)) {
- $query = $this->query->create();
- }
-
- if ($this->merchant) {
- $query->filterByMerchant($this->merchant);
- }
-
- return parent::getAllOpen($limit, $query);
- }
-
- public function countAllOpen($query = null): string
- {
- if (is_null($query)) {
- $query = $this->query->create();
- }
-
- if ($this->merchant) {
- $query->filterByMerchant($this->merchant);
- }
-
- return parent::countAllOpen($query);
- }
-
- }
|