You are here

function apachesolr_environment_load in Apache Solr Search 8

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

Function that loads an environment

Parameters

$env_id: The environment ID it needs to load.

Return value

$environment The environment that was requested or FALSE if non-existent

21 calls to apachesolr_environment_load()
AbstractDrupalSolrOnlineWebTestCase::setUpSolr in tests/solr_index_and_search.test
apachesolr_bias_settings_page in ./apachesolr_search.admin.inc
Menu callback - Bias settings form.
apachesolr_ctools_environment_export in ./apachesolr.module
Callback for exporting Apache Solr environments as CTools exportables.
apachesolr_environment_clone in ./apachesolr.module
Function that clones an environment
apachesolr_environment_delete in ./apachesolr.module
Function that deletes an environment

... See full list

1 string reference to 'apachesolr_environment_load'
apachesolr_environment_edit_form in ./apachesolr.admin.inc
Form builder for adding/editing a Solr environment used as a menu callback.

File

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

Code

function apachesolr_environment_load($env_id) {
  $environments = apachesolr_load_all_environments();
  return isset($environments[$env_id]) ? $environments[$env_id] : FALSE;
}