You are here

function image_attach_views_tables in Image 5.2

Same name and namespace in other branches
  1. 5 contrib/image_attach/image_attach.module \image_attach_views_tables()

Implementation of hook_views_tables().

File

contrib/image_attach/image_attach.module, line 345
image_attach.module

Code

function image_attach_views_tables() {
  $tables['image_attach'] = array(
    'name' => 'image_attach',
    'join' => array(
      'left' => array(
        'table' => 'node',
        'field' => 'nid',
      ),
      'right' => array(
        'field' => 'nid',
      ),
    ),
    'fields' => array(
      'iid' => array(
        'name' => t('Image Attach: Display Image'),
        'handler' => array(
          'image_attach_views_handler_field_iid' => t('Image'),
          'image_attach_views_handler_field_iid_link_node' => t('Image with link to attaching node'),
          'image_attach_views_handler_field_iid_link_image' => t('Image with link to attached image'),
        ),
        'option' => array(
          '#type' => 'select',
          '#options' => 'image_views_handler_filter_image_size',
        ),
        'sortable' => FALSE,
      ),
    ),
    'filters' => array(
      'iid' => array(
        'name' => t('Image Attach: Attached image'),
        'operator' => array(
          '=' => t('Exists'),
        ),
        'list' => 'views_handler_operator_yesno',
        'list-type' => 'select',
        'handler' => 'image_attach_views_handler_filter_iid_exist',
        'help' => t('Filter by whether or not the node has an attached image.'),
      ),
    ),
  );
  return $tables;
}