function commerce_price_decimals_formatter_handler_area_line_item_summary_decimals::get_value in Commerce Price Decimals Formatter 7
Get a value used for rendering.
Parameters
object $values: An object containing all retrieved values.
string $field: Optional name of the field where the value is stored.
1 call to commerce_price_decimals_formatter_handler_area_line_item_summary_decimals::get_value()
- commerce_price_decimals_formatter_handler_area_line_item_summary_decimals::render in includes/
views/ handlers/ commerce_price_decimals_formatter_handler_area_line_item_summary_decimals.inc - Render the area.
File
- includes/
views/ handlers/ commerce_price_decimals_formatter_handler_area_line_item_summary_decimals.inc, line 73 - Defines a line item summary area handler so the summary can be plugged into the View itself.
Class
- commerce_price_decimals_formatter_handler_area_line_item_summary_decimals
- @file Defines a line item summary area handler so the summary can be plugged into the View itself.
Code
function get_value($values, $field = NULL) {
// Find the alias for the line_item_id field.
$field_alias = '';
foreach ($this->view->query->fields as $key => $value) {
if ($value['field'] == 'line_item_id') {
$field_alias = $value['alias'];
}
}
if (isset($values->{$field_alias})) {
return $values->{$field_alias};
}
}