You are here

function ad_text_views_tables in Advertisement 5.2

Same name and namespace in other branches
  1. 5 text/ad_text_views.inc \ad_text_views_tables()

File

text/ad_text_views.inc, line 3

Code

function ad_text_views_tables() {
  return array(
    'ad_text' => array(
      'name' => 'ad_text',
      'join' => array(
        'left' => array(
          'table' => 'ads',
          'field' => 'aid',
        ),
        'right' => array(
          'field' => 'aid',
        ),
      ),
      'fields' => array(
        'url' => array(
          'name' => 'Text 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' => 'Text Ad: Advertisement',
          'handler' => 'ad_text_handler_field_text',
          'option' => array(
            '',
          ),
        ),
      ),
    ),
  );
}