theme_pager_first

Versions
4.6
theme_pager_first($text, $limit, $element = 0, $attributes = array())
4.7 – 6
theme_pager_first($text, $limit, $element = 0, $parameters = array())
7
theme_pager_first($variables)

Format a "first page" link.

Parameters

$variables An associative array containing:

  • text: The name (or image) of the link.
  • element: An optional integer to distinguish between multiple pagers on one page.
  • parameters: An associative array of query string parameters to append to the pager links.

Return value

An HTML string that generates this piece of the query pager.

Related topics

Code

includes/pager.inc, line 338

<?php
function theme_pager_first($variables) {
  $text = $variables['text'];
  $element = $variables['element'];
  $parameters = $variables['parameters'];
  global $pager_page_array;
  $output = '';

  // If we are anywhere but the first page
  if ($pager_page_array[$element] > 0) {
    $output = theme('pager_link', array('text' => $text, 'page_new' => pager_load_array(0, $element, $pager_page_array), 'element' => $element, 'parameters' => $parameters));
  }

  return $output;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.