|
- <?php
-
- namespace domain\Communication\AutomaticEmail;
-
- use domain\_\AbstractRepository;
- use domain\_\RepositoryQueryInterface;
-
- class AutomaticEmailRepository extends AbstractRepository
- {
- protected AutomaticEmailRepositoryQuery $query;
-
- public function loadDependencies(): void
- {
- $this->loadQuery(AutomaticEmailRepositoryQuery::class);
- }
-
- public function getDefaultOptionsSearch(): array
- {
- return [
- self::WITH => [],
- self::JOIN_WITH => [],
- self::ORDER_BY => 'day ASC',
- self::ATTRIBUTE_ID_PRODUCER => 'automatic_email.id_producer'
- ];
- }
-
- public function findOneAutomaticEmailById(int $id): ?AutomaticEmail
- {
- return $this->createDefaultQuery()
- ->filterById($id)
- ->findOne();
- }
-
- public function queryAutomaticEmails(): RepositoryQueryInterface
- {
- return $this->createDefaultQuery();
- }
- }
|