You are here

function search_by_page_setting_get in Search by Page 6

Same name and namespace in other branches
  1. 7 search_by_page.module \search_by_page_setting_get()

Returns a setting for Search by Page or a sub-module.

This is like the Drupal variable_get() function, except that it is environment-aware.

Parameters

$name: Name of the setting.

$environment: ID of the environment.

$default: Default value to return if setting has not been defined.

Return value

Setting value, or $default if not defined.

See also

search_by_page_setting_set()

32 calls to search_by_page_setting_get()
sbp_attach_sbp_details in ./sbp_attach.module
Implementation of Search by Page hook_sbp_details().
sbp_attach_sbp_paths in ./sbp_attach.module
Implementation of Search by Page hook_sbp_paths().
sbp_attach_sbp_query_modify in ./sbp_attach.module
Implementation of Search by Page hook_sbp_query_modify().
sbp_attach_sbp_settings in ./sbp_attach.module
Implementation of Search by Page hook_sbp_settings().
sbp_ga_preprocess_page in ./sbp_ga.module
Implementation of hook_preprocess_page().

... See full list

File

./search_by_page.module, line 406
Main module file for Drupal module Search by Page.

Code

function search_by_page_setting_get($name, $environment, $default) {
  $stuff = variable_get('search_by_page_settings', array());
  if (isset($stuff[$environment][$name])) {
    return $stuff[$environment][$name];
  }
  return $default;
}