You are here

function ad_image_views_tables in Advertisement 5

Same name and namespace in other branches
  1. 5.2 image/ad_image_views.inc \ad_image_views_tables()

File

image/ad_image_views.inc, line 3

Code

function ad_image_views_tables() {
  return array(
    'ad_image' => array(
      'name' => 'ad_image',
      'join' => array(
        'left' => array(
          'table' => 'ads',
          'field' => 'aid',
        ),
        'right' => array(
          'field' => 'aid',
        ),
      ),
      'fields' => array(
        'url' => array(
          'name' => 'Image Ad: Click-through URL',
          'handler' => 'ad_handler_field_url',
          'option' => array(
            '#type' => 'select',
            '#options' => array(
              'link' => t('As link'),
              'nolink' => t('Not as link'),
            ),
          ),
        ),
        'aid' => array(
          'name' => 'Image Ad: Image',
          'handler' => 'ad_image_handler_field_image',
          'option' => array(
            '#type' => 'select',
            '#options' => array(
              'linkimage' => t('Linked Image'),
              'image' => t('Unlinked Image'),
              'path' => t('Image path'),
            ),
          ),
        ),
      ),
    ),
  );
}