Ejemplo n.º 1
0
 /**
  * Get options
  *
  * @return array
  */
 public function toOptionArray()
 {
     if ($this->options === null) {
         $this->options = $this->paymentHelper->getPaymentMethodList(true, true);
     }
     return $this->options;
 }
Ejemplo n.º 2
0
 /**
  * Transform some specific data for output
  *
  * @param string $key
  * @return array|null
  */
 public function renderData($key)
 {
     $value = $this->_getData($key);
     switch ($key) {
         case 'period_unit':
             return $this->_periodUnits->toOptionArray()[$value];
         case 'method_code':
             if (!$this->_paymentMethods) {
                 $this->_paymentMethods = $this->_paymentData->getPaymentMethodList(false);
             }
             if (isset($this->_paymentMethods[$value])) {
                 return $this->_paymentMethods[$value];
             }
             break;
         case 'start_datetime':
             return $this->exportStartDatetime();
     }
     return $value;
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function toOptionArray()
 {
     return $this->_paymentData->getPaymentMethodList(true, true, true);
 }