You are here

function variable_include in Variable 7.2

Same name and namespace in other branches
  1. 6 variable.module \variable_include()
  2. 7 variable.module \variable_include()

Include extended API and files related to specific variable

Parameters

$variable: Variable array

18 calls to variable_include()
variable_admin_page_group in variable_admin/variable_admin.inc
Variable overview, by group
variable_admin_page_module in variable_admin/variable_admin.inc
Variable overview, by group
variable_build in ./variable.module
Build full variable data
variable_build_variable in ./variable.inc
Build single variable
variable_callback in ./variable.inc
Invoke variable callback

... See full list

File

./variable.module, line 473
Variable API module

Code

function variable_include($variable = NULL) {
  static $included;
  if (!isset($included)) {

    // As a first step, include main variable API
    module_load_include('inc', 'variable');
    $included = array();
  }
  if ($variable && !isset($included[$variable['name']])) {

    // Include module.variable.inc files related to the variable and the variable type.
    variable_module_include($variable['module']);
    variable_type_include($variable['type']);
    $included[$variable['name']] = TRUE;
  }
}