Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Install_Block_Abstract
  • Mage_Install_Block_Admin
  • Mage_Install_Block_Begin
  • Mage_Install_Block_Config
  • Mage_Install_Block_Db_Main
  • Mage_Install_Block_Db_Type
  • Mage_Install_Block_Db_Type_Mysql4
  • Mage_Install_Block_Download
  • Mage_Install_Block_End
  • Mage_Install_Block_Locale
  • Mage_Install_Block_State
  • Mage_Install_Controller_Action
  • Mage_Install_Helper_Data
  • Mage_Install_IndexController
  • Mage_Install_Model_Config
  • Mage_Install_Model_Installer
  • Mage_Install_Model_Installer_Abstract
  • Mage_Install_Model_Installer_Config
  • Mage_Install_Model_Installer_Console
  • Mage_Install_Model_Installer_Data
  • Mage_Install_Model_Installer_Db
  • Mage_Install_Model_Installer_Db_Abstract
  • Mage_Install_Model_Installer_Db_Mysql4
  • Mage_Install_Model_Installer_Env
  • Mage_Install_Model_Installer_Filesystem
  • Mage_Install_Model_Installer_Pear
  • Mage_Install_Model_Observer
  • Mage_Install_Model_Session
  • Mage_Install_Model_Wizard
  • Mage_Install_WizardController
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * Magento
  4:  *
  5:  * NOTICE OF LICENSE
  6:  *
  7:  * This source file is subject to the Open Software License (OSL 3.0)
  8:  * that is bundled with this package in the file LICENSE.txt.
  9:  * It is also available through the world-wide-web at this URL:
 10:  * http://opensource.org/licenses/osl-3.0.php
 11:  * If you did not receive a copy of the license and are unable to
 12:  * obtain it through the world-wide-web, please send an email
 13:  * to license@magentocommerce.com so we can send you a copy immediately.
 14:  *
 15:  * DISCLAIMER
 16:  *
 17:  * Do not edit or add to this file if you wish to upgrade Magento to newer
 18:  * versions in the future. If you wish to customize Magento for your
 19:  * needs please refer to http://www.magentocommerce.com for more information.
 20:  *
 21:  * @category    Mage
 22:  * @package     Mage_Install
 23:  * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
 24:  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 25:  */
 26: 
 27: /**
 28:  * Install localization block
 29:  *
 30:  * @category   Mage
 31:  * @package    Mage_Install
 32:  * @author      Magento Core Team <core@magentocommerce.com>
 33:  */
 34: class Mage_Install_Block_Locale extends Mage_Install_Block_Abstract
 35: {
 36: 
 37:     public function __construct()
 38:     {
 39:         parent::__construct();
 40:         $this->setTemplate('install/locale.phtml');
 41:     }
 42: 
 43:     /**
 44:      * Retrieve locale object
 45:      *
 46:      * @return Zend_Locale
 47:      */
 48:     public function getLocale()
 49:     {
 50:         $locale = $this->getData('locale');
 51:         if (is_null($locale)) {
 52:             $locale = Mage::app()->getLocale()->getLocale();
 53:             $this->setData('locale', $locale);
 54:         }
 55:         return $locale;
 56:     }
 57: 
 58:     /**
 59:      * Retrieve locale data post url
 60:      *
 61:      * @return string
 62:      */
 63:     public function getPostUrl()
 64:     {
 65:         return $this->getCurrentStep()->getNextUrl();
 66:         //return $this->getUrl('*/*/localePost');
 67:     }
 68: 
 69:     /**
 70:      * Retrieve locale change url
 71:      *
 72:      * @return string
 73:      */
 74:     public function getChangeUrl()
 75:     {
 76:         return $this->getUrl('*/*/localeChange');
 77:     }
 78: 
 79:     /**
 80:      * Retrieve locale dropdown HTML
 81:      *
 82:      * @return string
 83:      */
 84:     public function getLocaleSelect()
 85:     {
 86:         $html = $this->getLayout()->createBlock('core/html_select')
 87:             ->setName('config[locale]')
 88:             ->setId('locale')
 89:             ->setTitle(Mage::helper('install')->__('Locale'))
 90:             ->setClass('required-entry')
 91:             ->setValue($this->getLocale()->__toString())
 92:             ->setOptions(Mage::app()->getLocale()->getTranslatedOptionLocales())
 93:             ->getHtml();
 94:         return $html;
 95:     }
 96: 
 97:     /**
 98:      * Retrieve timezone dropdown HTML
 99:      *
100:      * @return string
101:      */
102:     public function getTimezoneSelect()
103:     {
104:         $html = $this->getLayout()->createBlock('core/html_select')
105:             ->setName('config[timezone]')
106:             ->setId('timezone')
107:             ->setTitle(Mage::helper('install')->__('Time Zone'))
108:             ->setClass('required-entry')
109:             ->setValue($this->getTimezone())
110:             ->setOptions(Mage::app()->getLocale()->getOptionTimezones())
111:             ->getHtml();
112:         return $html;
113:     }
114: 
115:     /**
116:      * Retrieve timezone
117:      *
118:      * @return string
119:      */
120:     public function getTimezone()
121:     {
122:         $timezone = Mage::getSingleton('install/session')->getTimezone()
123:             ? Mage::getSingleton('install/session')->getTimezone()
124:             : Mage::app()->getLocale()->getTimezone();
125:         if ($timezone == Mage_Core_Model_Locale::DEFAULT_TIMEZONE) {
126:             $timezone = 'America/Los_Angeles';
127:         }
128:         return $timezone;
129:     }
130: 
131:     /**
132:      * Retrieve currency dropdown html
133:      *
134:      * @return string
135:      */
136:     public function getCurrencySelect()
137:     {
138:         $html = $this->getLayout()->createBlock('core/html_select')
139:             ->setName('config[currency]')
140:             ->setId('currency')
141:             ->setTitle(Mage::helper('install')->__('Default Currency'))
142:             ->setClass('required-entry')
143:             ->setValue($this->getCurrency())
144:             ->setOptions(Mage::app()->getLocale()->getOptionCurrencies())
145:             ->getHtml();
146:         return $html;
147:     }
148: 
149:     /**
150:      * Retrieve currency
151:      *
152:      * @return string
153:      */
154:     public function getCurrency()
155:     {
156:         return Mage::getSingleton('install/session')->getCurrency()
157:             ? Mage::getSingleton('install/session')->getCurrency()
158:             : Mage::app()->getLocale()->getCurrency();
159:     }
160: 
161:     public function getFormData()
162:     {
163:         $data = $this->getData('form_data');
164:         if (is_null($data)) {
165:             $data = new Varien_Object();
166:             $this->setData('form_data', $data);
167:         }
168:         return $data;
169:     }
170: 
171: }
172: 
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0