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.

TicketMessageStore.php 1.1KB

пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
пре 3 година
12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Lc\SovBundle\Repository\Ticket;
  3. use Lc\SovBundle\Model\Ticket\TicketInterface;
  4. use Lc\SovBundle\Repository\AbstractStore;
  5. use Lc\SovBundle\Repository\RepositoryQueryInterface;
  6. class TicketMessageStore extends AbstractStore implements TicketMessageStoreInterface
  7. {
  8. protected TicketMessageRepositoryQueryInterface $query;
  9. public function __construct(TicketMessageRepositoryQueryInterface $query)
  10. {
  11. $this->query = $query;
  12. }
  13. public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
  14. {
  15. $query->orderBy('createdAt', 'ASC');
  16. return $query;
  17. }
  18. public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
  19. {
  20. return $query;
  21. }
  22. public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
  23. {
  24. return $query;
  25. }
  26. public function getByTicket(TicketInterface $ticket, $query = null)
  27. {
  28. $query = $this->createDefaultQuery($query);
  29. $query->filterByTicket($ticket);
  30. return $query->find();
  31. }
  32. }