function iframe_field_info in Iframe 7
Same name and namespace in other branches
- 6 iframe.module \iframe_field_info()
Implements hook_field_info(). Shows the "Field type" while adding a new field to the content-type (Step 1)
1 call to iframe_field_info()
- iframe_get_mymodule_fields in ./
iframe.install - Helper: Returns all fields created on the system of the type defined in mymodule.
File
- ./
iframe.module, line 60 - Defines an iframe field with all attributes.
Code
function iframe_field_info() {
return array(
'iframe' => array(
'label' => t('Iframe'),
'description' => t('This field stores the parameters for an iframe.'),
/* define defaults either in 'settings' (globally) OR in 'instance_settings' (per content-type) */
// settings - used as default values for the general field definition
'settings' => array(
#'title' => '',
#'url' => '',
#'width' => '',
#'height' => '',
'class' => 'field-iframe',
/* class-name is the only attribute, which we use additive */
'frameborder' => 0,
/* "0" or "yes" */
'scrolling' => 'auto',
'transparency' => 0,
'tokensupport' => 0,
),
'instance_settings' => array(
#'title' => '',
#'url' => '',
'width' => '100%',
'height' => '800',
'class' => 'field-iframe-instance',
#'frameborder' => 0, /* "0" or "yes" */
#'scrolling' => 'auto',
#'transparency' => 0,
#'tokensupport' => 0,
'expose_class' => 1,
'allowfullscreen' => 0,
),
'default_widget' => 'iframe_widget_url',
'default_formatter' => 'iframe_formatter_default',
),
);
}