Beispiel #1
0
 /**
  * @return $this
  */
 public function getPreviousResult()
 {
     if ($this->getPreviousPage()) {
         return $this->client->getCollection($this->getNextPage(), $this->getCurrentPage() - 1, $this->getPerPage());
     }
     return null;
 }
Beispiel #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;
 }
Beispiel #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');
 }
Beispiel #4
0
 /**
  *
  * Delete one given section
  *
  * @param Section $section
  * @return bool
  */
 public function delete(Section $section)
 {
     return parent::deleteById($section->getId(), 'help_center/sections');
 }
Beispiel #5
0
 /**
  *
  * Delete one given categorie
  *
  * @param Category $categorie
  * @return bool
  */
 public function delete(Category $categorie)
 {
     return parent::deleteById($categorie->getId(), 'help_center/categories');
 }
Beispiel #6
0
 /**
  *
  * Delete one given article
  *
  * @param Article $article
  * @return bool
  */
 public function delete(Article $article)
 {
     return parent::deleteById($article->getId(), 'help_center/articles');
 }