コード例 #1
0
ファイル: Info.php プロジェクト: votanlean/Magento-Pruebas
 /**
  * Render info item
  *
  * @param array $keys
  * @param Mage_Payment_Model_Info $payment
  * @param bool $labelValuesOnly
  */
 protected function _getFullInfo(array $keys, Mage_Payment_Model_Info $payment, $labelValuesOnly)
 {
     $result = array();
     foreach ($keys as $key) {
         if (!isset($this->_paymentMapFull[$key])) {
             $this->_paymentMapFull[$key] = array();
         }
         if (!isset($this->_paymentMapFull[$key]['label'])) {
             if (!$payment->hasAdditionalInformation($key)) {
                 $this->_paymentMapFull[$key]['label'] = false;
                 $this->_paymentMapFull[$key]['value'] = false;
             } else {
                 $value = $payment->getAdditionalInformation($key);
                 $this->_paymentMapFull[$key]['label'] = $this->_getLabel($key);
                 $this->_paymentMapFull[$key]['value'] = $this->_getValue($value, $key);
             }
         }
         if (!empty($this->_paymentMapFull[$key]['value'])) {
             if ($labelValuesOnly) {
                 $result[$this->_paymentMapFull[$key]['label']] = $this->_paymentMapFull[$key]['value'];
             } else {
                 $result[$key] = $this->_paymentMapFull[$key];
             }
         }
     }
     return $result;
 }