function views_handler_field_amazon_title::render_link in Amazon Product Advertisement API 7.2
Same name and namespace in other branches
- 7 includes/views_handler_field_amazon_title.inc \views_handler_field_amazon_title::render_link()
1 call to views_handler_field_amazon_title::render_link()
- views_handler_field_amazon_title::render in includes/
views_handler_field_amazon_title.inc - Render the field.
File
- includes/
views_handler_field_amazon_title.inc, line 45
Class
Code
function render_link($title, $values) {
switch ($this->options['link_format']) {
case 'plain':
break;
case 'amazon':
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['path'] = $this
->sanitize_value($this
->get_value($values, 'detailpageurl'), 'link');
$this->options['alter']['html'] = TRUE;
break;
case 'amazon_store':
$path = function_exists('amazon_store_get_amazon_store_path') ? amazon_store_get_amazon_store_path() : 'amazon_store';
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['html'] = TRUE;
$asin = $this
->get_value($values, 'asin');
$this->options['alter']['path'] = $path . '/item/' . $asin;
break;
}
return $title;
}