You are here

function _nat_variable_get in Node Auto Term [NAT] 7.2

Same name and namespace in other branches
  1. 5 nat.module \_nat_variable_get()
  2. 6.2 nat.module \_nat_variable_get()
  3. 6 nat.module \_nat_variable_get()
  4. 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.

15 calls to _nat_variable_get()
NatSettingsTest::testNatSettings in tests/nat.test
NAT settings test.
NatWebTestCase::setDefaults in tests/nat.test
nat_fields_form in ./nat.admin.inc
Menu callback: NAT module fields form. @todo This form is something of a mess and could use a little clean-up.
nat_fields_form_submit in ./nat.admin.inc
Process NAT fields form submissions.
nat_form_alter in ./nat.module
Implements hook_form_alter().

... See full list

File

./nat.module, line 742
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(),
      'delete' => array(),
      'associations' => array(),
    );
    $variables = variable_get('nat_config', array());
    $variables = array_merge($defaults, $variables);
  }
  return $name ? $variables[$name] : $variables;
}