|
|
|
|
|
|
|
|
use Lc\CaracoleBundle\Model\Section\SectionInterface; |
|
|
use Lc\CaracoleBundle\Model\Section\SectionInterface; |
|
|
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; |
|
|
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; |
|
|
use Lc\CaracoleBundle\Repository\SectionStoreTrait; |
|
|
use Lc\CaracoleBundle\Repository\SectionStoreTrait; |
|
|
|
|
|
use Lc\SovBundle\Model\User\UserInterface; |
|
|
use Lc\SovBundle\Repository\Reminder\ReminderStore as SovReminderStore; |
|
|
use Lc\SovBundle\Repository\Reminder\ReminderStore as SovReminderStore; |
|
|
|
|
|
|
|
|
class ReminderStore extends SovReminderStore |
|
|
class ReminderStore extends SovReminderStore |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function get($params = [], $query = null) |
|
|
public function get($params = [], $query = null) |
|
|
{ |
|
|
{ |
|
|
if(is_null($query)) { |
|
|
|
|
|
|
|
|
if (is_null($query)) { |
|
|
$query = $this->query->create(); |
|
|
$query = $this->query->create(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if($this->merchant) { |
|
|
|
|
|
|
|
|
if ($this->merchant) { |
|
|
$query->filterByMerchant($this->merchant); |
|
|
$query->filterByMerchant($this->merchant); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if($this->section) { |
|
|
|
|
|
|
|
|
if ($this->section) { |
|
|
$query->filterBySection($this->section); |
|
|
$query->filterBySection($this->section); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return parent::get($params, $query); |
|
|
return parent::get($params, $query); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getByUser(UserInterface $user, $query = null): array |
|
|
|
|
|
{ |
|
|
|
|
|
if (is_null($query)) { |
|
|
|
|
|
$query = $this->query->create(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($this->merchant) { |
|
|
|
|
|
$query->filterByMerchant($this->merchant); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return parent::getByUser($user, $query); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function getByEasyAdminConfigAndUser( |
|
|
|
|
|
string $crudAction, |
|
|
|
|
|
string $crudControllerFqcn, |
|
|
|
|
|
UserInterface $user, |
|
|
|
|
|
int $entityId = null, |
|
|
|
|
|
$query = null |
|
|
|
|
|
): array { |
|
|
|
|
|
if (is_null($query)) { |
|
|
|
|
|
$query = $this->query->create(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($this->merchant) { |
|
|
|
|
|
$query->filterByMerchant($this->merchant); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return parent::getByEasyAdminConfigAndUser($crudAction, $crudControllerFqcn, $user, $entityId, $query); |
|
|
|
|
|
} |
|
|
} |
|
|
} |