Public Member Functions | |
getType () | |
setType (Varien_Object $type) | |
getFormat (Mage_Customer_Model_Address_Abstract $address=null) | |
render (Mage_Customer_Model_Address_Abstract $address, $format=null) | |
Protected Attributes | |
$_type |
Definition at line 35 of file Default.php.
getFormat | ( | Mage_Customer_Model_Address_Abstract $ | address = null |
) |
Definition at line 66 of file Default.php.
00067 { 00068 $countryFormat = is_null($address) ? false : $address->getCountryModel()->getFormat($this->getType()->getCode()); 00069 $format = $countryFormat ? $countryFormat->getFormat() : $this->getType()->getDefaultFormat(); 00070 return $format; 00071 }
getType | ( | ) |
Retrive format type object
Implements Mage_Customer_Block_Address_Renderer_Interface.
Definition at line 49 of file Default.php.
render | ( | Mage_Customer_Model_Address_Abstract $ | address, | |
$ | format = null | |||
) |
Render address
Mage_Customer_Model_Address_Abstract | $address |
Definition at line 79 of file Default.php.
00080 { 00081 $address->getRegion(); 00082 $address->getCountry(); 00083 $address->explodeStreetAddress(); 00084 00085 $formater = new Varien_Filter_Template(); 00086 $data = $address->getData(); 00087 if ($this->getType()->getHtmlEscape()) { 00088 foreach ($data as $key => $value) { 00089 $data[$key] = $this->htmlEscape($value); 00090 } 00091 } 00092 $formater->setVariables(array_merge($data, array('country'=>$address->getCountryModel()->getName()))); 00093 00094 $format = !is_null($format) ? $format : $this->getFormat($address); 00095 00096 return $formater->filter($format); 00097 }
setType | ( | Varien_Object $ | type | ) |
Retrive format type object
Varien_Object | $type |
Implements Mage_Customer_Block_Address_Renderer_Interface.
Definition at line 60 of file Default.php.
$_type [protected] |
Definition at line 42 of file Default.php.