コード例 #1
0
 public function collection($resourceKey, array $data)
 {
     $data = $this->reformatData($data);
     return parent::collection($resourceKey, $data);
 }
コード例 #2
0
 /**
  * Serialize the paginator.
  *
  * @param PaginatorInterface $paginator
  *
  * @return array
  */
 public function paginator(PaginatorInterface $paginator)
 {
     $pagination = parent::paginator($paginator)['pagination'];
     $data = ['total' => $pagination['total'], 'count' => $pagination['count'], 'perPage' => $pagination['per_page'], 'currentPage' => $pagination['current_page'], 'totalPages' => $pagination['total_pages']];
     return ['pagination' => $data];
 }
コード例 #3
0
 /**
  * Serialize the paginator.
  *
  * @param PaginatorInterface $paginator
  *
  * @return array
  */
 public function paginator(PaginatorInterface $paginator)
 {
     $data = parent::paginator($paginator);
     unset($data['pagination']['links']);
     return $data;
 }