You are here

function google_cse_theme in Google Custom Search Engine 8.2

Same name and namespace in other branches
  1. 8.3 google_cse.module \google_cse_theme()
  2. 8 google_cse.module \google_cse_theme()
  3. 6 google_cse.module \google_cse_theme()
  4. 7.3 google_cse.module \google_cse_theme()
  5. 7 google_cse.module \google_cse_theme()
  6. 7.2 google_cse.module \google_cse_theme()

Implements hook_theme().

File

./google_cse.module, line 58
Display a Google Custom Search Engine (CSE) on your site.

Code

function google_cse_theme($existing, $type, $theme, $path) {
  return array(
    'google_cse_results' => array(
      'variables' => array(
        'form' => FALSE,
        'path' => $path,
      ),
      'file' => 'google_cse.theme.inc',
      'template' => 'google_cse_results',
    ),
    // @TODO confirm the placement of template file.
    // @see https://www.drupal.org/node/2853472
    'google_cse_adv_results' => array(
      'variables' => array(
        'form' => FALSE,
        'path' => $path,
      ),
      'file' => 'google_cse.theme.inc',
      'template' => 'google_cse_adv/templates/google_cse_adv_results',
    ),
    // Shows a message when the search does not return any result.
    'google_cse_search_noresults' => array(
      'variables' => array(),
      'function' => 'theme_google_cse_search_noresults',
    ),
  );
}