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.

TicketStore.php 942B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\Ticket;
  3. use Lc\CaracoleBundle\Repository\SectionStoreTrait;
  4. use Lc\SovBundle\Model\User\UserInterface;
  5. use Lc\SovBundle\Repository\Ticket\TicketStore as SovTicketStore;
  6. class TicketStore extends SovTicketStore
  7. {
  8. use SectionStoreTrait;
  9. public function getByUser(UserInterface $user, $query = null): array
  10. {
  11. $query = $this->createQuery($query);
  12. $query->filterBySection($this->section);
  13. return parent::getByUser($user, $query);
  14. }
  15. public function getOpen(int $limit = 0, $query = null): array
  16. {
  17. $query = $this->createQuery($query);
  18. $query->filterBySection($this->section);
  19. return parent::getOpen($limit, $query);
  20. }
  21. public function countOpen($query = null): string
  22. {
  23. $query = $this->createQuery($query);
  24. $query->filterBySection($this->section);
  25. return parent::countOpen($query);
  26. }
  27. }