1 node_type_example.module _node_type_example_installed_fields()

Defines the fields for our content type.

Return value

array: An associative array specifying the fields we wish to add to our new content type.

Related topics

File

modules/examples/node_type_example/node_type_example.module, line 224
Hook implementations for the Node Type Example module.

Code

function _node_type_example_installed_fields() {
  return array(
    'node_type_example_color' => array(
      'field_name' => 'node_type_example_color',
      'cardinality' => 3,
      'type' => 'text',
      'settings' => array(
        'max_length' => 60,
      ),
    ),
    'node_type_example_quantity' => array(
      'field_name' => 'node_type_example_quantity',
      'cardinality' => 1,
      'type' => 'text',
    ),
    'node_type_example_image' => array(
      'field_name' => 'node_type_example_image',
      'type' => 'image',
      'cardinality' => 1,
    ),
  );
}