You are here

function node_variable_type_subform in Variable 7

Same name and namespace in other branches
  1. 7.2 includes/node.variable.inc \node_variable_type_subform()

Build subform for variables for node type

Parameters

$type: Node type name

$list: List of variables to include

File

includes/node.variable.inc, line 137
Variable API module. Definition for Drupal core variables

Code

function node_variable_type_subform($type, $list) {
  module_load_include('form.inc', 'variable');
  foreach ($list as $name) {
    $variable = variable_get_child($name . '_[node_type]', $type);
    $form[$name] = variable_form_element($variable);
  }
  return $form;
}