Skip to content

Instantly share code, notes, and snippets.

@cyberswat
Created January 27, 2011 22:39
Show Gist options
  • Save cyberswat/799451 to your computer and use it in GitHub Desktop.
Save cyberswat/799451 to your computer and use it in GitHub Desktop.
_complex_widget_installed_fields()
<?php
/**
* Return a structured array defining the fields created by this content type.
*
* This is packaged in a function so it can be used in both
* node_example_install() and node_example_uninstall().
*/
function _complex_widget_installed_fields() {
return array(
'complex_widget_variable' => array(
'field_name' => 'complex_widget_variable',
'type' => 'complex_widget_variable',
'module' => 'complex_widget',
'cardinality' => FIELD_CARDINALITY_UNLIMITED,
'translatable' => FALSE,
'settings' => array(
'name_max_length' => 128,
'type_max_length' => 16,
)
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment