function views_plugin_pager_full::set_current_page
Same name in other branches
- 7.x-3.x plugins/views_plugin_pager_full.inc \views_plugin_pager_full::set_current_page()
Set the current page.
Parameters
$number: If provided, the page number will be set to this. If NOT provided, the page number will be set from the global page array.
Overrides views_plugin_pager::set_current_page
File
-
plugins/
views_plugin_pager_full.inc, line 222
Class
- views_plugin_pager_full
- The plugin to handle full pager.
Code
function set_current_page($number = NULL) {
if (isset($number)) {
$this->current_page = $number;
return;
}
// If the current page number was not prespecified, default to pulling it from 'page'
// based upon
global $pager_page_array;
// Extract the ['page'] info.
$pager_page_array = isset($_GET['page']) ? explode(',', $_GET['page']) : array();
$this->current_page = 0;
if (!empty($pager_page_array[$this->options['id']])) {
$this->current_page = intval($pager_page_array[$this->options['id']]);
}
}