loadQuery(TicketMessageRepositoryQuery::class); } /** * Retourne les options de base nécessaires à la fonction de recherche. */ public function getDefaultOptionsSearch(): array { return [ self::WITH => ['user'], self::JOIN_WITH => [], self::ORDER_BY => '', self::ATTRIBUTE_ID_PRODUCER => '' ]; } public function findTicketMessagesByTicketId(int $ticketId) { return $this->createDefaultQuery() ->filterByTicketId($ticketId) ->find(); } public function countTicketMessagesByTicketId(int $ticketId): int { return count($this->findTicketMessagesByTicketId($ticketId)); } }