You are here

function node_field_create_node_field in Node Field 7.2

Create a new node field.

Field should contain all required attributes except field id.

Parameters

array $field: Array of field attributes.

Return value

bool Returns FALSE in case operation failed.

3 calls to node_field_create_node_field()
node_field_copy_node_fields in includes/node_field.api.inc
Copy node fields from one node to another.
node_field_node_field_form_submit in includes/node_field.form.node_field.inc
Submit handler for "Save" button.
node_field_node_update in ./node_field.module
Implements hook_node_update().

File

includes/node_field.api.inc, line 104
API and helpers functions for Node Field module.

Code

function node_field_create_node_field(array &$field) {
  $result = node_field_db_field_insert($field);
  if ($result) {
    module_invoke_all('node_field_insert', $field);
  }
  return $result;
}