You are here

function apachesolr_environment_settings_page in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr.admin.inc \apachesolr_environment_settings_page()
  2. 6.3 apachesolr.admin.inc \apachesolr_environment_settings_page()

Settings page for a specific environment (or default one if not provided)

Parameters

array|bool $environment:

Return value

array Render array for a settings page

File

./apachesolr.admin.inc, line 67
Administrative pages for the Apache Solr framework.

Code

function apachesolr_environment_settings_page(array $environment = array()) {
  if (empty($environment)) {
    $env_id = apachesolr_default_environment();
    $environment = apachesolr_environment_load($env_id);
  }
  $env_id = $environment['env_id'];

  // Initializes output with information about which environment's setting we are
  // editing, as it is otherwise not transparent to the end user.
  $output = array(
    'apachesolr_environment' => array(
      '#theme' => 'apachesolr_settings_title',
      '#env_id' => $env_id,
    ),
  );
  $output['form'] = drupal_get_form('apachesolr_environment_edit_form', $environment);
  return $output;
}