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.

33 lines
700B

  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\Reminder;
  3. use Lc\SovBundle\Repository\Reminder\ReminderStore as SovReminderStore;
  4. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  5. /**
  6. * class ReminderStore.
  7. *
  8. * @author Simon Vieille <simon@deblan.fr>
  9. */
  10. class ReminderStore extends SovReminderStore
  11. {
  12. protected MerchantInterface $merchant;
  13. public function setMerchant(MerchantInterface $merchant)
  14. {
  15. $this->merchant = $merchant;
  16. }
  17. public function getFoo($query = null)
  18. {
  19. $query = $this->query->create();
  20. if ($this->merchant) {
  21. $query->filterByMerchant($this->merchant);
  22. }
  23. return parent::getFoo($query);
  24. }
  25. }