You are here

Method.php in Ubercart 8.4

File

payment/uc_payment/src/Plugin/views/field/Method.php
View source
<?php

namespace Drupal\uc_payment\Plugin\views\field;

use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\views\ResultRow;

/**
 * Field handler to provide payment method.
 *
 * @ingroup views_field_handlers
 *
 * @ViewsField("uc_payment_method")
 */
class Method extends FieldPluginBase {

  /**
   * {@inheritdoc}
   */
  public function render(ResultRow $values) {
    $value = $this
      ->getValue($values);
    $methods = uc_payment_method_list();
    return $this
      ->sanitizeValue($methods[$value]['name']);
  }

}

Classes

Namesort descending Description
Method Field handler to provide payment method.