function hook_apachesolr_default_environment in Apache Solr Search 7
Same name and namespace in other branches
- 8 apachesolr.api.php \hook_apachesolr_default_environment()
- 6.3 apachesolr.api.php \hook_apachesolr_default_environment()
Lets modules know when the default environment is changed.
Parameters
string $env_id: The machine name of the environment.
string $old_env_id: The old machine name of the environment.
1 function implements hook_apachesolr_default_environment()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
1 invocation of hook_apachesolr_default_environment()
- apachesolr_set_default_environment in ./
apachesolr.module - Set the default environment and let other modules know about the change.
File
- ./
apachesolr.api.php, line 15 - Exposed Hooks in 7.x:
Code
function hook_apachesolr_default_environment($env_id, $old_env_id) {
$page = apachesolr_search_page_load('core_search');
if ($page && $page['env_id'] != $env_id) {
$page['env_id'] = $env_id;
apachesolr_search_page_save($page);
}
}