You are here

function node_variable_content_type_build in Variable 6

Build content type variables. Spawn for each content type

1 string reference to 'node_variable_content_type_build'
node_variable_info in includes/node.variable.inc
Node module variables

File

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

Code

function node_variable_content_type_build($variable, $options) {
  unset($variable['build_callback']);
  $build = array();
  foreach (node_get_types() as $type) {
    $name = $variable['name'] . '_' . $type->type;
    $build[$name] = $variable;
    $build[$name]['title'] .= ' (' . $type->name . ')';
    $build[$name]['name'] = $name;
  }
  return $build;
}