You are here

function node_field_node_field_widget_form in Node Field 7.2

Get node field widget form.

Parameters

array $node_field: Node field to get widget form for.

1 call to node_field_node_field_widget_form()
node_field_value_fields_form in includes/node_field.form.inc
Build node fields form for node.

File

includes/node_field.field.inc, line 104
Field types, settings, widget and formatters.

Code

function node_field_node_field_widget_form(array $node_field, &$form_state) {
  $form = [];
  $type = $node_field['type'];
  $node_field_types = node_field_types_info();
  $function = isset($node_field_types[$type]['widget']) ? $node_field_types[$type]['widget'] : FALSE;
  if ($function && is_callable($function)) {
    $form = $function($node_field, $form_state);
    drupal_alter('node_field_widget', $node_field, $form);
  }
  return $form;
}