You are here

public function GoogleSiteSearch::getPager in Google Site Search 7

Same name and namespace in other branches
  1. 6 includes/GoogleSiteSearch.inc \GoogleSiteSearch::GetPager()

Get a pager for the search results.

Return value

string The pager render array.

File

includes/GoogleSiteSearch.inc, line 403
GSS module site search inc file.

Class

GoogleSiteSearch
Class for interaction with Google Site Search.

Code

public function getPager() {

  // Initializing the pager.
  pager_default_initialize($this
    ->getTotalResults(), $this
    ->getPageSize());

  // Return pager.
  return array(
    '#theme' => variable_get('gss_full_pager', FALSE) ? 'pager' : 'gss_pager',
    '#variables' => array(
      'quantity' => $this
        ->getTotalResults(),
    ),
  );
}