function linkimagefield_theme in Link Image Field 6
Same name and namespace in other branches
- 8 linkimagefield.module \linkimagefield_theme()
- 7 linkimagefield.module \linkimagefield_theme()
File
- ./
linkimagefield.module, line 69 - Defines a link image field type.
Code
function linkimagefield_theme() {
$theme = array(
'linkimagefield_image' => array(
'arguments' => array(
'file' => NULL,
'alt' => '',
'title' => '',
'attributes' => NULL,
'getsize' => TRUE,
'url' => '',
),
),
// Theme a Link Image Field field item. It calls linkimagefied_image with the proper
// item properties as arguments.
'linkimagefield_item' => array(
'arguments' => array(
'item' => NULL,
),
),
// linkimagefield_widget form element type theme function.
'linkimagefield_widget' => array(
'arguments' => array(
'element' => NULL,
),
'file' => 'linkimagefield_widget.inc',
),
// Use to generate a preview (admin view) of an linkimagefield item for use in
// field item forms and filefield widgets. Invoked by filefield_widget_process.
'linkimagefield_widget_preview' => array(
'arguments' => array(
'item' => NULL,
),
),
// Theme function for the field item elements. allows you to place children
// within the context of the parent.
'linkimagefield_widget_item' => array(
'arguments' => array(
'element' => NULL,
),
),
// Generates and img tag to the admin thumbnail of an LinkImageField upload.
'linkimagefield_admin_thumbnail' => array(
'arguments' => array(
'item' => NULL,
),
),
'linkimagefield_formatter_linkimage' => array(
'arguments' => array(
'element' => NULL,
),
'file' => 'linkimagefield_formatter.inc',
),
);
$imagecache_presets = module_invoke('imagecache', 'presets');
foreach ($imagecache_presets as $preset) {
$theme['linkimagefield_formatter_' . $preset['presetname'] . '_linkimage'] = array(
'arguments' => array(
'element' => NULL,
),
'function' => 'theme_linkimagefield_imagecache',
);
}
return $theme;
}