function taxonomy_image_views_tables in Taxonomy Image 5
File
- ./
taxonomy_image.module, line 608 - taxonomy_image.module Simple module for providing an association between taxonomy terms and images. Written by Jeremy Andrews <jeremy@kerneltrap.org>, May 2004.
Code
function taxonomy_image_views_tables() {
$tables['term_image'] = array(
'name' => 'term_image',
'join' => array(
'left' => array(
'table' => 'term_node',
'field' => 'tid',
),
'right' => array(
'field' => 'tid',
),
),
'fields' => array(
'tid' => array(
'name' => t('Taxonomy Image: Image'),
'help' => t('The image associated with the node\'s taxonomy term.'),
'handler' => array(
'taxonomy_image_views_handler' => t('Image'),
'taxonomy_image_views_handler_link' => t('Image as Link'),
),
),
),
);
if (module_exists('imagecache')) {
$tables['term_image']['fields']['tid']['option']['#options'] = _taxonomy_image_presets();
$tables['term_image']['fields']['tid']['option']['#type'] = 'select';
}
return $tables;
}