Public Member Functions | |
__construct () | |
getBaseUrl () | |
getBaseSecureUrl () | |
getCurrentUrl () | |
getPrintLogoUrl () | |
getPrintLogoText () | |
setHeaderTitle ($title) | |
getHeaderTitle () | |
addBodyClass ($className) | |
getLang () | |
setTheme ($theme) | |
getBodyClass () | |
getAbsoluteFooter () | |
Protected Member Functions | |
_afterToHtml ($html) | |
Protected Attributes | |
$_urls = array() | |
$_title = '' |
Definition at line 34 of file Html.php.
__construct | ( | ) |
Constructor
By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes
Reimplemented from Varien_Object.
Definition at line 39 of file Html.php.
00040 { 00041 parent::__construct(); 00042 $this->_urls = array( 00043 'base' => Mage::getBaseUrl('web'), 00044 'baseSecure'=> Mage::getBaseUrl('web', true), 00045 'current' => $this->getRequest()->getRequestUri() 00046 ); 00047 00048 $action = Mage::app()->getFrontController()->getAction(); 00049 if ($action) { 00050 $this->addBodyClass($action->getFullActionName('-')); 00051 } 00052 00053 $this->_beforeCacheUrl(); 00054 }
_afterToHtml | ( | $ | html | ) | [protected] |
Processing block html after rendering
string | $html |
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 173 of file Html.php.
00174 { 00175 return $this->_afterCacheUrl($html); 00176 }
addBodyClass | ( | $ | className | ) |
Add CSS class to page body tag
string | $className |
Definition at line 131 of file Html.php.
00132 { 00133 $className = preg_replace('#[^a-z0-9]+#', '-', strtolower($className)); 00134 $this->setBodyClass($this->getBodyClass() . ' ' . $className); 00135 return $this; 00136 }
getAbsoluteFooter | ( | ) |
Definition at line 162 of file Html.php.
00163 { 00164 return Mage::getStoreConfig('design/footer/absolute_footer'); 00165 }
getBaseSecureUrl | ( | ) |
getBaseUrl | ( | ) |
Get base url of the application
Reimplemented from Mage_Core_Block_Template.
Definition at line 56 of file Html.php.
getBodyClass | ( | ) |
getCurrentUrl | ( | ) |
getHeaderTitle | ( | ) |
getLang | ( | ) |
getPrintLogoText | ( | ) |
Definition at line 109 of file Html.php.
00110 { 00111 return Mage::getStoreConfig('sales/identity/address'); 00112 }
getPrintLogoUrl | ( | ) |
Print Logo URL (Conf -> Sales -> Invoice and Packing Slip Design)
Definition at line 76 of file Html.php.
00077 { 00078 // load html logo 00079 $logo = Mage::getStoreConfig('sales/identity/logo_html'); 00080 if (!empty($logo)) { 00081 $logo = 'sales/store/logo_html/' . $logo; 00082 } 00083 00084 // load default logo 00085 if (empty($logo)) { 00086 $logo = Mage::getStoreConfig('sales/identity/logo'); 00087 if (!empty($logo)) { 00088 // prevent tiff format displaying in html 00089 if (strtolower(substr($logo, -5)) === '.tiff' || strtolower(substr($logo, -4)) === '.tif') { 00090 $logo = ''; 00091 } 00092 else { 00093 $logo = 'sales/store/logo/' . $logo; 00094 } 00095 } 00096 } 00097 00098 // buld url 00099 if (!empty($logo)) { 00100 $logo = Mage::getStoreConfig('web/unsecure/base_media_url') . $logo; 00101 } 00102 else { 00103 $logo = ''; 00104 } 00105 00106 return $logo; 00107 }
setHeaderTitle | ( | $ | title | ) |
setTheme | ( | $ | theme | ) |
Definition at line 146 of file Html.php.
00147 { 00148 $arr = explode('/', $theme); 00149 if (isset($arr[1])) { 00150 Mage::getDesign()->setPackageName($arr[0])->setTheme($arr[1]); 00151 } else { 00152 Mage::getDesign()->setTheme($theme); 00153 } 00154 return $this; 00155 }