commerce_registration_handler_field_registration_entity.inc in Commerce Registration 7.2
Same filename and directory in other branches
Commerce Registration attached entity views field handler.
File
includes/views/handlers/commerce_registration_handler_field_registration_entity.incView source
<?php
/**
* @file
* Commerce Registration attached entity views field handler.
*/
class CommerceRegistrationHandlerFieldRegistrationEntity extends views_handler_field {
/**
* Views handler constructor.
*/
function construct() {
parent::construct();
}
/**
* Returns a link to the registration's Commerce Product.
*
* @return string
* The HTML link to the product.
*/
function render($values) {
$product = commerce_product_load($values->registration_entity_id);
if (!empty($product)) {
$uri = entity_uri('commerce_product', $product);
$text = t('@product (@sku)', array(
'@product' => $product->title,
'@sku' => $product->sku,
));
return l($text, $uri['path']);
}
}
}
Classes
Name![]() |
Description |
---|---|
CommerceRegistrationHandlerFieldRegistrationEntity | @file Commerce Registration attached entity views field handler. |