Mage_PaypalUk_Block_Direct_Form Class Reference

Inheritance diagram for Mage_PaypalUk_Block_Direct_Form:

Mage_Payment_Block_Form_Cc Mage_Payment_Block_Form Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getCcAvailableTypes ()
 getSsStartYears ()
 hasSsCardType ()

Protected Member Functions

 _construct ()
 _getDirect ()


Detailed Description

Definition at line 28 of file Form.php.


Member Function Documentation

_construct (  )  [protected]

Internal constructor, that is called from real constructor

Please override this one instead of overriding real __construct constructor

Please override this one instead of overriding real __construct constructor

Reimplemented from Mage_Payment_Block_Form_Cc.

Definition at line 30 of file Form.php.

00031     {
00032         parent::_construct();
00033         $this->setTemplate('paypaluk/direct/form.phtml');
00034     }

_getDirect (  )  [protected]

Definition at line 36 of file Form.php.

00037     {
00038         return Mage::getSingleton('paypaluk/direct');
00039     }

getCcAvailableTypes (  ) 

Retrieve availables credit card types

Returns:
array

Reimplemented from Mage_Payment_Block_Form_Cc.

Definition at line 47 of file Form.php.

00048     {
00049         $types = $this->_getDirect()->getApi()->getCcTypes();
00050         if ($method = $this->getMethod()) {
00051             $availableTypes = $method->getConfigData('cctypes');
00052             if ($availableTypes) {
00053                 $availableTypes = explode(',', $availableTypes);
00054                 foreach ($types as $code=>$name) {
00055                     if (!in_array($code, $availableTypes)) {
00056                         unset($types[$code]);
00057                     }
00058                 }
00059             }
00060         }
00061         return $types;
00062     }

getSsStartYears (  ) 

Definition at line 68 of file Form.php.

00069     {
00070         $years = array();
00071         $first = date("Y");
00072 
00073         for ($index=5; $index>=0; $index--) {
00074             $year = $first - $index;
00075             $years[$year] = $year;
00076         }
00077         $years = array(0=>$this->__('Year'))+$years;
00078         return $years;
00079     }

hasSsCardType (  ) 

Definition at line 84 of file Form.php.

00085     {
00086         $availableTypes =$this->getMethod()->getConfigData('cctypes');
00087         if ($availableTypes) {
00088             $availableTypes = explode(',', $availableTypes);
00089              if (in_array('SS', $availableTypes)) {
00090                  return true;
00091              }
00092         }
00093         return false;
00094     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:33 2009 for Magento by  doxygen 1.5.8