You are here

function theme_apachesolr_settings_title in Apache Solr Search 8

Same name and namespace in other branches
  1. 6.3 apachesolr.module \theme_apachesolr_settings_title()
  2. 7 apachesolr.module \theme_apachesolr_settings_title()

Themes the title for settings pages.

3 theme calls to theme_apachesolr_settings_title()
apachesolr_bias_settings_page in ./apachesolr_search.admin.inc
Menu callback - Bias settings form.
apachesolr_enabled_facets_page in ./apachesolr.module
Wrapper for facetapi settings forms.
apachesolr_environment_settings_page in ./apachesolr.admin.inc
Settings page for a specific environment (or default one if not provided)

File

./apachesolr.module, line 2719
Integration with the Apache Solr search application.

Code

function theme_apachesolr_settings_title($vars) {
  $output = '';

  // Gets environment information, builds header with nested link to the environment's
  // edit page. Skips building title if environment info could not be retrieved.
  if ($environment = apachesolr_environment_load($vars['env_id'])) {
    $url = url('admin/config/search/apachesolr/settings/', array(
      'query' => array(
        'destination' => current_path(),
      ),
    ));
    $output .= '<h3>';
    $output .= t('Settings for: @environment (<a href="@url">Overview</a>)', array(
      '@url' => $url,
      '@environment' => $environment['name'],
    ));
    $output .= "</h3>\n";
  }
  return $output;
}