You are here

function variable_list in Variable 7

Same name and namespace in other branches
  1. 7.2 variable.module \variable_list()

Provide list of variable titles

Parameters

$names: List of variable names or full variable arrays

Return value

array() List of name => title

Related topics

1 call to variable_list()
_variable_views_variable_list in variable_views/variable_views.module
Variable list for the argument.

File

./variable.module, line 314
Variable API module

Code

function variable_list($names) {
  $list = array();
  foreach ($names as $name) {
    if ($variable = _variable_variable($name)) {
      $list[$variable['name']] = $variable['title'];
    }
  }
  return $list;
}