function views_handler_field_amazon_title::render in Amazon Product Advertisement API 6
Same name in this branch
- 6 includes/views_handler_field_amazon_title.inc \views_handler_field_amazon_title::render()
- 6 includes/views_handler_filter_amazon_node_module.inc \views_handler_field_amazon_title::render()
Same name and namespace in other branches
- 7.2 includes/views_handler_field_amazon_title.inc \views_handler_field_amazon_title::render()
- 7 includes/views_handler_field_amazon_title.inc \views_handler_field_amazon_title::render()
File
- includes/
views_handler_field_amazon_title.inc, line 43
Class
Code
function render($values) {
$title = check_plain($values->{$this->field_alias});
switch ($this->options['link_format']) {
case 'plain':
return $title;
break;
case 'node':
return l($title, 'node/' . $values->nid, array(
'html' => TRUE,
));
break;
case 'amazon':
return l($title, check_url($values->{$this->table_alias . '_detailpageurl'}), array(
'html' => TRUE,
));
break;
case 'amazon_store':
$path = function_exists('amazon_store_get_amazon_store_path') ? amazon_store_get_amazon_store_path() : 'amazon_store';
$asin = $values->{$this->aliases['asin']};
return l($title, "{$path}/item/{$asin}", array(
'html' => TRUE,
));
break;
}
}