You are here

function _nat_variable_get in Node Auto Term [NAT] 5

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

7 calls to _nat_variable_get()
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.module
Menu callback: NAT module settings form.
nat_set_config in ./nat.module
Update the NAT config to include node->vocabulary associations and related settings. Commonly used in .install files to register associations and save the admin some work.

... See full list

File

./nat.module, line 717
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;
}