function _nat_variable_get in Node Auto Term [NAT] 6
Same name and namespace in other branches
- 5 nat.module \_nat_variable_get()
- 6.2 nat.module \_nat_variable_get()
- 7.2 nat.module \_nat_variable_get()
- 7 nat.module \_nat_variable_get()
Return a NAT module variable.
Parameters
$name: The name of the variable to retrieve.
Return value
The value of the variable requested.
10 calls to _nat_variable_get()
- NatSettingsTest::testNatSettings in tests/
nat.test - NAT settings test.
- nat_form_alter in ./
nat.module - Implementation of hook_form_alter().
- nat_link_alter in ./
nat.module - Implementation of hook_link_alter().
- nat_nodeapi in ./
nat.module - Implementation of hook_nodeapi().
- nat_settings_form in ./
nat.admin.inc - Menu callback: NAT module settings form.
File
- ./
nat.module, line 600 - NAT - node auto term - is a helper module that automatically creates a term using the same title as a node.
Code
function _nat_variable_get($name = NULL) {
static $variables = array();
if (empty($variables)) {
$defaults = array(
'types' => array(),
'body' => array(),
'delete' => array(),
'related' => array(),
'node_links' => array(),
);
$variables = variable_get('nat_config', array());
$variables = array_merge($defaults, $variables);
}
return $name ? $variables[$name] : $variables;
}