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.

27 lines
705B

  1. <?php
  2. namespace common\logic;
  3. abstract class AbstractRepository extends AbstractService implements RepositoryInterface
  4. {
  5. public function createQuery()
  6. {
  7. $this->repositoryQuery->createQuery();
  8. return $this->repositoryQuery;
  9. }
  10. public function createDefaultQuery()
  11. {
  12. $this->createQuery();
  13. $defaultOptions = $this->getDefaultOptionsSearch();
  14. // id producer
  15. if(isset($defaultOptions['attribute_id_producer']) && $defaultOptions['attribute_id_producer']) {
  16. $this->repositoryQuery->andWhere([$defaultOptions['attribute_id_producer'] => $this->getProducerContextId()]);
  17. }
  18. return $this->repositoryQuery;
  19. }
  20. }