function commerce_product_handler_field_product_link::render in Commerce Core 7
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field::render
2 methods override commerce_product_handler_field_product_link::render()
- commerce_product_handler_field_product_link_delete::render in modules/
product/ includes/ views/ handlers/ commerce_product_handler_field_product_link_delete.inc - Render the field.
- commerce_product_handler_field_product_link_edit::render in modules/
product/ includes/ views/ handlers/ commerce_product_handler_field_product_link_edit.inc - Render the field.
File
- modules/
product/ includes/ views/ handlers/ commerce_product_handler_field_product_link.inc, line 36
Class
- commerce_product_handler_field_product_link
- Field handler to present a link to a product.
Code
function render($values) {
$text = !empty($this->options['text']) ? $this->options['text'] : t('view');
$product_id = $this
->get_value($values, 'product_id');
return l($text, 'admin/commerce/products/' . $product_id);
}