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