예제 #1
0
 /**
  * Immediately updates the entity.
  * @param Entity $entity
  * @param string $comment
  * @param bool $public
  * @throws \Exception
  */
 public function addCommentToTicket(Entity $entity, $comment, $public = true)
 {
     if (!$entity->exists()) {
         throw new \Exception("We can't add a comment to a ticket that doesn't already exist");
     }
     $response = $this->_apiService->addCommentToTicket($entity['id'], $comment, $public);
     if ($response['ticket']) {
         $entity->setFields($response['ticket']);
     }
     return $entity;
 }
예제 #2
0
 /**
  * (non-PHPdoc)
  * @see \Malwarebytes\ZendeskBundle\DataModel\AbstractRepository::getByDefaultSort()
  */
 public function getByDefaultSort()
 {
     return $this->_buildPaginatorFromResponse($this->_apiService->getAuditsForTicket($this->_ticket[$this->_ticket->getPrimaryKey()]));
 }