Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

ProductSubscriptionRepository.php 958B

123456789101112131415161718192021222324252627282930313233343536
  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. }