Ejemplo n.º 1
0
 /**
  * @return $this
  */
 public function getPreviousResult()
 {
     if ($this->getPreviousPage()) {
         return $this->client->getCollection($this->getNextPage(), $this->getCurrentPage() - 1, $this->getPerPage());
     }
     return null;
 }
Ejemplo n.º 2
0
 /**
  * Note: the web service never return next page URL, this method overrides the next_page url and resets the current pages param
  * @return $this
  */
 public function getPreviousResult()
 {
     if ($this->getCurrentPage() > 1) {
         return $this->client->getCollection($this->getEndPoint(), 'tickets', $this->getCurrentPage() - 1, $this->getPerPage());
     }
     return null;
 }
Ejemplo n.º 3
0
 /**
  * Batch delete tickets
  *
  * @param array $tickets
  * @return bool
  */
 public function deleteTickets(array $tickets)
 {
     $ids = array();
     foreach ($tickets as $ticket) {
         $ids[] = $ticket->getId();
     }
     return parent::deleteByIds($ids, 'tickets/destroy_many.json');
 }
Ejemplo n.º 4
0
 /**
  *
  * Delete one given section
  *
  * @param Section $section
  * @return bool
  */
 public function delete(Section $section)
 {
     return parent::deleteById($section->getId(), 'help_center/sections');
 }
Ejemplo n.º 5
0
 /**
  *
  * Delete one given categorie
  *
  * @param Category $categorie
  * @return bool
  */
 public function delete(Category $categorie)
 {
     return parent::deleteById($categorie->getId(), 'help_center/categories');
 }
Ejemplo n.º 6
0
 /**
  *
  * Delete one given article
  *
  * @param Article $article
  * @return bool
  */
 public function delete(Article $article)
 {
     return parent::deleteById($article->getId(), 'help_center/articles');
 }