Exemplo n.º 1
0
 /**
  * @param array  $data
  * @param array  $items
  * @param string $route
  *
  * @return SlidingPagination
  */
 public static function build(array $data, array $items, $route)
 {
     $pagination = new SlidingPagination($data['params']);
     $pagination->setItems($items);
     $pagination->setCurrentPageNumber($data['current_page_number']);
     $pagination->setItemNumberPerPage($data['num_items_per_page']);
     $pagination->setTotalItemCount($data['total_count']);
     $pagination->setPaginatorOptions($data['paginator_options']);
     $pagination->setCustomParameters($data['custom_parameters']);
     $pagination->setUsedRoute($route);
     $pagination->setPageRange($data['page_range']);
     $pagination->setTemplate($data['template']);
     $pagination->setSortableTemplate($data['sortable_template']);
     $pagination->setFiltrationTemplate($data['filtration_template']);
     return $pagination;
 }