Browse Source

Ticket : gestion visitorToken

develop
Guillaume 3 years ago
parent
commit
36574b7f04
2 changed files with 18 additions and 0 deletions
  1. +7
    -0
      Repository/Ticket/TicketRepositoryQuery.php
  2. +11
    -0
      Repository/Ticket/TicketStore.php

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

return $this return $this
->select('count(ticket.id) as count'); ->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 View File



return $query->count(); 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…
Cancel
Save