You are here

function CurrencyAmountViewsHandlerField::render in Currency 7.2

Overrides parent::render().

Throws

RuntimeException

Overrides views_handler_field::render

File

currency/includes/CurrencyAmountViewsHandlerField.inc, line 93
Contains class CurrencyAmountViewsHandlerField.

Class

CurrencyAmountViewsHandlerField
A Views field handler for currency amounts.

Code

function render($values) {
  $currency = $this
    ->getCurrency($values);
  $amount = $this
    ->getAmount($values);
  if ($this->options['currency_round']) {
    $amount = $currency
      ->roundAmount($amount);
  }
  return $currency
    ->format($amount);
}