class CommentManager implements CommentManagerInterface, BasicEntityManagerInterface

Class CommentManager is injected as alligator.comment_manager service. CommentManager handles the logic for entity.

Properties

protected CommentRepository $repository
protected CommentEventContainer $eventContainer

Methods

__construct(CommentRepository $repository, CommentEventContainer $eventContainer)

CommentManager constructor.

array
findAllComments()

No description

mixed
findAllCommentsLimited(int $limit)

Find provided($limit) number of comments(as array)

bool
changeCommentStatuses(array $array, int $ticketId)

Change status of all provided comments to "seen"

array
findAllCommentsById(int $id)

Find all comments for provided ticket id

findComment(Comment $comment)

Find comment(as object) by id

mixed
saveComment(Comment $comment)

Save new comment, and send email to user and all admin users

getDBTicket(Ticket $ticket)

Find ticket(as array) for provided id

getTicketObjectById(int $ticketId)

Find ticket(as object) for provided id

deleteComment(Comment $comment)

Remove comment by id

editComment(Comment $comment)

No description

getDBOrder(Order $order)

Find order(as object) for provided id

Details

at line 39
__construct(CommentRepository $repository, CommentEventContainer $eventContainer)

CommentManager constructor.

Parameters

CommentRepository $repository
CommentEventContainer $eventContainer

at line 48
array findAllComments()

Return Value

array

at line 60
mixed findAllCommentsLimited(int $limit)

Find provided($limit) number of comments(as array)

Parameters

int $limit

Return Value

mixed

at line 76
bool changeCommentStatuses(array $array, int $ticketId)

Change status of all provided comments to "seen"

Parameters

array $array Array of comment ids
int $ticketId

Return Value

bool

Exceptions

ORMException
OptimisticLockException

at line 88
array findAllCommentsById(int $id)

Find all comments for provided ticket id

Parameters

int $id Ticket id

Return Value

array

at line 100
Comment findComment(Comment $comment)

Find comment(as object) by id

Parameters

Comment $comment

Return Value

Comment

at line 112
mixed saveComment(Comment $comment)

Save new comment, and send email to user and all admin users

Parameters

Comment $comment

Return Value

mixed

at line 145
Ticket getDBTicket(Ticket $ticket)

Find ticket(as array) for provided id

Parameters

Ticket $ticket

Return Value

Ticket

Exceptions

NoResultException
NonUniqueResultException

at line 160
Ticket getTicketObjectById(int $ticketId)

Find ticket(as object) for provided id

Parameters

int $ticketId

Return Value

Ticket

Exceptions

NoResultException
NonUniqueResultException

at line 175
Comment deleteComment(Comment $comment)

Remove comment by id

Parameters

Comment $comment

Return Value

Comment

Exceptions

ORMException
OptimisticLockException

at line 183
Comment editComment(Comment $comment)

Parameters

Comment $comment

Return Value

Comment

at line 195
Order getDBOrder(Order $order)

Find order(as object) for provided id

Parameters

Order $order

Return Value

Order