Sfoglia il codice sorgente

Merge branch 'develop'

develop
Guillaume 3 anni fa
parent
commit
3a5ac71c29
2 ha cambiato i file con 18 aggiunte e 0 eliminazioni
  1. +7
    -0
      Repository/Ticket/TicketRepositoryQuery.php
  2. +11
    -0
      Repository/Ticket/TicketStore.php

+ 7
- 0
Repository/Ticket/TicketRepositoryQuery.php Vedi File

@@ -73,4 +73,11 @@ class TicketRepositoryQuery extends AbstractRepositoryQuery implements TicketRep
return $this
->select('count(ticket.id) as count');
}

public function filterByVisitorToken(string $visitorToken): self
{
return $this
->andWhere('.visitorToken LIKE :visitorToken')
->setParameter('visitorToken', $visitorToken);
}
}

+ 11
- 0
Repository/Ticket/TicketStore.php Vedi File

@@ -66,4 +66,15 @@ class TicketStore extends AbstractStore implements TicketStoreInterface

return $query->count();
}

public function getOneByIdAndVisitorToken(int $id, string $token, $query = null)
{
$query = $this->createDefaultQuery($query);

$query
->filterById($id)
->filterByVisitorToken($token);

return $query->findOne();
}
}

Loading…
Annulla
Salva