function pager_load_array
7.x pager.inc | pager_load_array($value, $element, $old_array) |
6.x pager.inc | pager_load_array($value, $element, $old_array) |
Helper function
Copies $old_array to $new_array and sets $new_array[$element] = $value Fills in $new_array[0 .. $element - 1] = 0
5 calls to pager_load_array()
- theme_pager_first in drupal-7.x/
includes/ pager.inc - Returns HTML for the "first page" link in a query pager.
- theme_pager_last in drupal-7.x/
includes/ pager.inc - Returns HTML for the "last page" link in query pager.
- theme_pager_link in drupal-7.x/
includes/ pager.inc - Returns HTML for a link to a specific query result page.
- theme_pager_next in drupal-7.x/
includes/ pager.inc - Returns HTML for the "next page" link in a query pager.
- theme_pager_previous in drupal-7.x/
includes/ pager.inc - Returns HTML for the "previous page" link in a query pager.
File
- drupal-7.x/
includes/ pager.inc, line 652 - Functions to aid in presenting database results as a set of pages.
Code
function pager_load_array($value, $element, $old_array) {
$new_array = $old_array;
// Look for empty elements.
for ($i = 0; $i < $element; $i++) {
if (empty($new_array[$i])) {
// Load found empty element with 0.
$new_array[$i] = 0;
}
}
// Update the changed element.
$new_array[$element] = (int) $value;
return $new_array;
}