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.

29 lines
781B

  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\Reminder;
  3. use Lc\CaracoleBundle\Repository\MerchantStoreTrait;
  4. use Lc\CaracoleBundle\Repository\SectionStoreTrait;
  5. use Lc\SovBundle\Model\User\UserInterface;
  6. use Lc\SovBundle\Repository\Reminder\ReminderStore as SovReminderStore;
  7. use Lc\SovBundle\Repository\RepositoryQueryInterface;
  8. class ReminderStore extends SovReminderStore
  9. {
  10. use SectionStoreTrait;
  11. use MerchantStoreTrait;
  12. public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
  13. {
  14. if ($this->merchant) {
  15. $query->filterByMerchant($this->merchant);
  16. }
  17. if ($this->section) {
  18. $query->filterBySection($this->section);
  19. }
  20. return parent::filtersDefault($query);
  21. }
  22. }