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.
|
- <?php
-
- namespace Lc\SovBundle\Repository\User;
-
- use App\Entity\Newsletter\Newsletter;
- use Lc\SovBundle\Repository\AbstractStore;
-
- class UserStore extends AbstractStore implements UserStoreInterface
- {
- protected UserRepositoryQueryInterface $query;
-
- public function __construct(UserRepositoryQueryInterface $query)
- {
- $this->query = $query;
- }
-
- //findAllByNewsletter
- public function getByNewsletter(Newsletter $newsletter, $query = null): array
- {
- if (is_null($query)) {
- $query = $this->query->create();
- }
-
- $query
- ->filterByNewsletter($newsletter);
-
- return $query->find();
- }
-
- //findByRole
- public function getByRole(string $role): array
- {
- $query = $this->query->create();
- $query
- ->filterLikeRole($role);
-
- return $query->find();
- }
-
- //findByTicketTypesNotification
- public function getByTicketTypesNotification(string $ticketType): array
- {
- $query = $this->query->create();
- $query
- ->filterLikeTicketTypeNotification($ticketType);
-
- return $query->find();
- }
- }
|