diff --git a/core/includes/pager.inc b/core/includes/pager.inc index b96a904..b738b39 100644 --- a/core/includes/pager.inc +++ b/core/includes/pager.inc @@ -11,18 +11,18 @@ /** * Returns the current page being requested for display within a pager. * - * @param integer $element - * An optional integer to distinguish between multiple pagers on one page. + * @param int $element + * An optional integer to distinguish between multiple pagers on one page. * - * @return integer - * The number of the current requested page, within the pager represented by - * $element. This is determined from the URL query parameter - * \Drupal::request()->query->get('page'), or 0 by default. Note that this - * number may differ from the actual page being displayed. For example, if a - * search for "example text" brings up three pages of results, but a users - * visits search/node/example+text?page=10, this function will return 10, even - * though the default pager implementation adjusts for this and still displays - * the third page of search results at that URL. + * @return int + * The number of the current requested page, within the pager represented by + * $element. This is determined from the URL query parameter + * \Drupal::request()->query->get('page'), or 0 by default. Note that this + * number may differ from the actual page being displayed. For example, if a + * search for "example text" brings up three pages of results, but a users + * visits search/node/example+text?page=10, this function will return 10, even + * though the default pager implementation adjusts for this and still displays + * the third page of search results at that URL. * * @see pager_default_initialize() */ @@ -108,14 +108,14 @@ function pager_find_page($element = 0) { * return $render; * @endcode * - * @param integer $total - * The total number of items to be paged. - * @param integer $limit - * The number of items the calling code will display per page. - * @param integer $element - * An optional integer to distinguish between multiple pagers on one page. + * @param int $total + * The total number of items to be paged. + * @param int $limit + * The number of items the calling code will display per page. + * @param int $element + * An optional integer to distinguish between multiple pagers on one page. * - * @return integer + * @return int * The number of the current page, within the pager represented by $element. * This is determined from the URL query parameter * \Drupal::request()->query->get('page), or 0 by default. However, if a page @@ -164,7 +164,7 @@ function pager_get_query_parameters() { * An associative array containing: * - pager: A render element containing: * - #tags: An array of labels for the controls in the pager. - * - #element: An optional integer to distinguish between multiple pagers on + * - #element: An optional int to distinguish between multiple pagers on * one page. * - #parameters: An associative array of query string parameters to append to * the pager links. @@ -277,21 +277,21 @@ function template_preprocess_pager(&$variables) { } /** - * Adds the 'page' parameter to the query parameter array of a pager link. + * Adds the 'page' parameter to the url query parameter array of a pager link. * - * Since we can have multiple pager on a single page, each pager has an index + * Since we can have multiple pagers on a single page, each pager has an index * value assigned to it. If we have 5 pages on a single page, we could assign - * them the index numbers: 0, 1, 2, 3, 4. To indecate, that the 3rd pager is on + * them the index numbers: 0, 1, 2, 3, 4. To indicate that the 3rd pager is on * page 5, we would need to indicate this in the url query, by having index 2 - * have the value of 5. The query would then look like this: page=0,0,5. It's - * such quries that is generated through this function, taking all pagers on - * the page into account. + * have the value of 5. The url query would then look like this: page=0,0,5. + * It's such an url query that is generated through this function, taking all + * pagers on the page into account. * * @param array $query * An associative array of query parameters to add to. - * @param integer $element + * @param int $element * An integer to distinguish between multiple pagers on one page. - * @param integer $index + * @param int $index * The index of the target page in the pager array. * * @return array @@ -299,7 +299,7 @@ function template_preprocess_pager(&$variables) { */ function pager_query_add_page(array $query, $element, $index) { // The general idea is to create an array with all the needed values and then - // use implode to convert it to a string of integers seperated by comma. Get + // use implode to convert it to a string of integers separated by comma. Get // the default values from the request make sure other queries are maintained. $page = \Drupal::request()->query->get('page', ''); if ($new_page = implode(',', pager_load_array($index, $element, explode(',', $page)))) { @@ -321,12 +321,13 @@ function pager_query_add_page(array $query, $element, $index) { * Copies $old_array to $new_array and sets $new_array[$element] = $value * Fills in $new_array[0 .. $element - 1] = 0 * - * @param integer $value - * The value to for the $element index in the array to be returned. - * @param integer $element - * The index that should have it value set to the value of $value. + * @param int $value + * The value which will be set in the copied array returned by this function. + * @param int $element + * The index which will have it's value overridden in the copied array + * returned by this function. * @param array $old_array - * The array the is the base for the array to be generated. + * Array which will be copied and modified. * * @return array * Copy of $old_array generated through the rule described above.