You are here

function commerce_payment_handler_field_payment_method::render in Commerce Core 7

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides views_handler_field::render

File

modules/payment/includes/views/handlers/commerce_payment_handler_field_payment_method.inc, line 34

Class

commerce_payment_handler_field_payment_method
Field handler to translate a payment method ID into its readable form.

Code

function render($values) {
  $value = $this
    ->get_value($values);
  if ($payment_method = commerce_payment_method_load($value)) {
    return $this
      ->sanitize_value($payment_method[$this->options['title']]);
  }
  else {
    return t('Unknown');
  }
}