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.

FeatureProducerRepository.php 828B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace domain\Feature\FeatureProducer;
  3. use domain\Feature\Feature\Feature;
  4. use domain\_\AbstractRepository;
  5. class FeatureProducerRepository extends AbstractRepository
  6. {
  7. protected FeatureProducerRepositoryQuery $query;
  8. public function loadDependencies(): void
  9. {
  10. $this->loadQuery(FeatureProducerRepositoryQuery::class);
  11. }
  12. public function getDefaultOptionsSearch(): array
  13. {
  14. return [
  15. self::WITH => ['feature', 'producer'],
  16. self::JOIN_WITH => [],
  17. self::ORDER_BY => '',
  18. self::ATTRIBUTE_ID_PRODUCER => 'feature_producer.id_producer'
  19. ];
  20. }
  21. public function findOneFeatureProducer(Feature $feature)
  22. {
  23. return $this->createDefaultQuery()
  24. ->filterByFeature($feature)
  25. ->findOne();
  26. }
  27. }