Ejemplo n.º 1
0
 /**
  * Retrieve payment information block
  *
  * @param   Mage_Payment_Model_Info $info
  * @return  Mage_Core_Block_Template
  */
 public function getInfoBlock(Mage_Payment_Model_Info $info)
 {
     $instance = $this->getMethodInstance($info->getMethod());
     if ($instance) {
         $instance->setInfoInstance($info);
         $info->setMethodInstance($instance);
     }
     $blockType = $instance->getInfoBlockType();
     if ($this->getLayout()) {
         $block = $this->getLayout()->createBlock($blockType);
     } else {
         $className = Mage::getConfig()->getBlockClassName($blockType);
         $block = new $className();
     }
     $block->setInfo($info);
     return $block;
 }