You are here

function views_handler_field_amazon_title::init in Amazon Product Advertisement API 6

Same name in this branch
  1. 6 includes/views_handler_field_amazon_title.inc \views_handler_field_amazon_title::init()
  2. 6 includes/views_handler_filter_amazon_node_module.inc \views_handler_field_amazon_title::init()
Same name and namespace in other branches
  1. 7.2 includes/views_handler_field_amazon_title.inc \views_handler_field_amazon_title::init()
  2. 7 includes/views_handler_field_amazon_title.inc \views_handler_field_amazon_title::init()

Override init function to provide generic option to link to node.

File

includes/views_handler_field_amazon_title.inc, line 12

Class

views_handler_field_amazon_title

Code

function init(&$view, &$data) {
  parent::init($view, $data);
  if (!empty($data['link_format']) && $data['link_format'] == 'amazon') {
    $this->additional_fields[] = 'detailpageurl';
  }
  $this->additional_fields[] = 'asin';
}