Hello,
where can I find some documentation about what kind of field types are usable with the Field Types API?
There's hook_field_info but that doesn't define for example numeric types.
I'm going to use a numeric field in this case:
/**
* Returns a structured array defining the fields created by this content type.
*
* This is factored into this function so it can be used in both
* event_install() and event_uninstall().
*
* @return
* An associative array specifying the fields we wish to add to our
* new node type.
*
* @ingroup event
*/
function _event_installed_fields() {
$t = get_t();
return array(
'event_date' => array(
'field_name' => 'event_date',
'type' => 'text',
'cardinality' => 1,
'settings' => array(
'tz_handling' => 'date',
),
),
'event_location' => array(
'field_name' => 'event_location',
'cardinality' => 1,
'type' => 'text',
),
'event_image' => array(
'field_name' => 'event_image',
'type' => 'image',
'cardinality' => 1,
),
'event_number' => array(
'field_name' => 'event_number',
'type' => 'integer', // HOW CAN I USE A NUMERIC (or other) TYPE ?