Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

36 rindas
958B

  1. <?php
  2. namespace domain\Subscription\ProductSubscription;
  3. use domain\Subscription\Subscription\Subscription;
  4. use domain\_\AbstractRepository;
  5. class ProductSubscriptionRepository extends AbstractRepository
  6. {
  7. protected ProductSubscriptionRepositoryQuery $query;
  8. public function loadDependencies(): void
  9. {
  10. $this->loadQuery(ProductSubscriptionRepositoryQuery::class);
  11. }
  12. /**
  13. * Retourne les options de base nécessaires à la fonction de recherche.
  14. */
  15. public function getDefaultOptionsSearch(): array
  16. {
  17. return [
  18. self::WITH => ['product'],
  19. self::JOIN_WITH => [],
  20. self::ORDER_BY => '',
  21. self::ATTRIBUTE_ID_PRODUCER => ''
  22. ];
  23. }
  24. public function findProductSubscriptionsBySubscription(Subscription $subscription): array
  25. {
  26. return $this->createDefaultQuery()
  27. ->filterBySubscription($subscription)
  28. ->find();
  29. }
  30. }