|
- <?php
-
- namespace Lc\CaracoleBundle\Repository\Reminder;
-
- use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
- use Lc\CaracoleBundle\Model\Section\SectionInterface;
- use Lc\CaracoleBundle\Repository\MerchantStoreTrait;
- use Lc\CaracoleBundle\Repository\SectionStoreTrait;
- use Lc\SovBundle\Repository\Reminder\ReminderStore as SovReminderStore;
-
- class ReminderStore extends SovReminderStore
- {
- use SectionStoreTrait;
- use MerchantStoreTrait;
-
- public function get($params = [], $query = null)
- {
- if(is_null($query)) {
- $query = $this->query->create();
- }
-
- if($this->merchant) {
- $query->filterByMerchant($this->merchant);
- }
-
- if($this->section) {
- $query->filterBySection($this->section);
- }
-
- return parent::get($params, $query);
- }
-
- }
|