public function initialize(Grid $grid) { parent::initialize($grid); $this->pagination_factory = $grid->getConfig()->getDataProvider()->getPaginationFactory(); $this->previous_page_name = $this->pagination_factory->getPageName(); $this->input_key = $grid->getInputProcessor()->getKey(); $this->setupPaginationForReading(); }
/** * Add a query string value to the paginator. * * @param string $key * @param string $value * @return $this */ public function addQuery($key, $value) { if ($key !== $this->factory->getPageName()) { $this->query[$key] = $value; } return $this; }
/** * Get the input page parameter name used by the paginator. * * @return string * @static */ public static function getPageName() { return \Illuminate\Pagination\Factory::getPageName(); }