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_XmlConnect_Adminhtml_MobileController
  • Mage_XmlConnect_Block_Adminhtml_History
  • Mage_XmlConnect_Block_Adminhtml_History_Grid
  • Mage_XmlConnect_Block_Adminhtml_Mobile
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Form
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Submission
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Cache
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Content
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Images
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Tabs
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Themes
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Preview
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Themes
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Flurryanalytics
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_General
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Notification
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Payment
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Settings
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Social
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Submission_History
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tabs
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Addrow
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Color
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Country
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Datetime
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Font
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Image
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Page
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Tabs
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Theme
  • Mage_Xmlconnect_Block_Adminhtml_Mobile_Grid
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Grid_Renderer_Bool
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Grid_Renderer_Type
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Content
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Tabitems
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Form
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Renderer_Country_Androidmarket
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Renderer_Country_Istore
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Tab_Container
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Tab_Container_Submission
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Tabs
  • Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form
  • Mage_XmlConnect_Block_Adminhtml_Queue
  • Mage_XmlConnect_Block_Adminhtml_Queue_Edit
  • Mage_XmlConnect_Block_Adminhtml_Queue_Edit_Form
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Action
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Application
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Id
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Msgtitle
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Pushtitle
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Status
  • Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Template
  • Mage_XmlConnect_Block_Adminhtml_Template
  • Mage_XmlConnect_Block_Adminhtml_Template_Edit
  • Mage_XmlConnect_Block_Adminhtml_Template_Edit_Form
  • Mage_XmlConnect_Block_Adminhtml_Template_Grid
  • Mage_XmlConnect_Block_Adminhtml_Template_Grid_Renderer_Application
  • Mage_XmlConnect_Block_Adminhtml_Template_Grid_Renderer_Name
  • Mage_XmlConnect_Block_Adminhtml_Template_Preview
  • Mage_XmlConnect_Block_Adminhtml_Template_Preview_Form
  • Mage_XmlConnect_Block_Cart
  • Mage_XmlConnect_Block_Cart_Crosssell
  • Mage_XmlConnect_Block_Cart_Info
  • Mage_XmlConnect_Block_Cart_Item_Renderer
  • Mage_XmlConnect_Block_Cart_Item_Renderer_Configurable
  • Mage_XmlConnect_Block_Cart_Item_Renderer_Grouped
  • Mage_XmlConnect_Block_Cart_Paypal_Mecl_Details
  • Mage_XmlConnect_Block_Cart_Paypal_Mecl_Review
  • Mage_XmlConnect_Block_Cart_Paypal_Mecl_Shippingmethods
  • Mage_XmlConnect_Block_Cart_Paypal_Mep_Totals
  • Mage_XmlConnect_Block_Cart_Totals
  • Mage_XmlConnect_Block_Catalog
  • Mage_XmlConnect_Block_Catalog_Category
  • Mage_XmlConnect_Block_Catalog_Category_Info
  • Mage_XmlConnect_Block_Catalog_Filters
  • Mage_XmlConnect_Block_Catalog_Product
  • Mage_XmlConnect_Block_Catalog_Product_Attributes
  • Mage_XmlConnect_Block_Catalog_Product_Gallery
  • Mage_XmlConnect_Block_Catalog_Product_List
  • Mage_XmlConnect_Block_Catalog_Product_Options
  • Mage_XmlConnect_Block_Catalog_Product_Options_Bundle
  • Mage_XmlConnect_Block_Catalog_Product_Options_Configurable
  • Mage_XmlConnect_Block_Catalog_Product_Options_Giftcard
  • Mage_XmlConnect_Block_Catalog_Product_Options_Grouped
  • Mage_XmlConnect_Block_Catalog_Product_Options_Simple
  • Mage_XmlConnect_Block_Catalog_Product_Options_Virtual
  • Mage_XmlConnect_Block_Catalog_Product_Price
  • Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
  • Mage_XmlConnect_Block_Catalog_Product_Price_Default
  • Mage_XmlConnect_Block_Catalog_Product_Price_Giftcard
  • Mage_XmlConnect_Block_Catalog_Product_Related
  • Mage_XmlConnect_Block_Catalog_Product_Review
  • Mage_XmlConnect_Block_Catalog_Product_Review_List
  • Mage_XmlConnect_Block_Catalog_Search
  • Mage_XmlConnect_Block_Catalog_Search_Suggest
  • Mage_XmlConnect_Block_Checkout_Address_Billing
  • Mage_XmlConnect_Block_Checkout_Address_Form
  • Mage_XmlConnect_Block_Checkout_Address_Shipping
  • Mage_XmlConnect_Block_Checkout_Agreements
  • Mage_XmlConnect_Block_Checkout_Order_Review
  • Mage_XmlConnect_Block_Checkout_Order_Review_Info
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Authorizenet
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Ccsave
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Checkmo
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Authorizenet
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Ccsave
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Checkmo
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Free
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Paypal_Abstract
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Paypal_Express
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Paypal_Mecl
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Pbridge_Authorizenet
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Pbridge_Paypal_Direct
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Pbridge_Paypaluk_Direct
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Pbridge_Verisign
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Info_Purchaseorder
  • Mage_XmlConnect_Block_Checkout_Payment_Method_List
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Paypal_Direct
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Paypal_Payflow
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Abstract
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Authorizenet
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Paypal
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Paypaluk
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Pbridge_Verisign
  • Mage_XmlConnect_Block_Checkout_Payment_Method_Purchaseorder
  • Mage_XmlConnect_Block_Checkout_Pbridge_Result
  • Mage_XmlConnect_Block_Checkout_Shipping_Method_Available
  • Mage_XmlConnect_Block_Cms_Page
  • Mage_XmlConnect_Block_Configuration
  • Mage_XmlConnect_Block_Customer_Address_Form
  • Mage_XmlConnect_Block_Customer_Address_List
  • Mage_XmlConnect_Block_Customer_Form
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Boolean
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Date
  • Mage_XmlConnect_Block_Customer_Form_Renderer_File
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Image
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Multiline
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Multiselect
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Select
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Text
  • Mage_XmlConnect_Block_Customer_Form_Renderer_Textarea
  • Mage_XmlConnect_Block_Customer_GiftcardCheck
  • Mage_XmlConnect_Block_Customer_Order_Details
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Bundle
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Default
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Downloadable
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Giftcard
  • Mage_XmlConnect_Block_Customer_Order_Item_Renderer_Grouped
  • Mage_XmlConnect_Block_Customer_Order_Items
  • Mage_XmlConnect_Block_Customer_Order_List
  • Mage_XmlConnect_Block_Customer_Order_Totals
  • Mage_XmlConnect_Block_Customer_Order_Totals_Customerbalance
  • Mage_XmlConnect_Block_Customer_Order_Totals_Customerbalance_Refunded
  • Mage_XmlConnect_Block_Customer_Order_Totals_Giftcards
  • Mage_XmlConnect_Block_Customer_Order_Totals_Tax
  • Mage_XmlConnect_Block_Customer_Storecredit
  • Mage_XmlConnect_Block_Home
  • Mage_XmlConnect_Block_Review_Form
  • Mage_XmlConnect_Block_Wishlist
  • Mage_XmlConnect_CartController
  • Mage_XmlConnect_CatalogController
  • Mage_XmlConnect_CheckoutController
  • Mage_XmlConnect_CmsController
  • Mage_XmlConnect_ConfigurationController
  • Mage_XmlConnect_Controller_Action
  • Mage_XmlConnect_CustomerController
  • Mage_XmlConnect_Helper_Android
  • Mage_XmlConnect_Helper_Catalog_Category_Image
  • Mage_XmlConnect_Helper_Customer_Form_Renderer
  • Mage_XmlConnect_Helper_Customer_Order
  • Mage_XmlConnect_Helper_Data
  • Mage_XmlConnect_Helper_Image
  • Mage_XmlConnect_Helper_Ipad
  • Mage_XmlConnect_Helper_Iphone
  • Mage_XmlConnect_Helper_Theme
  • Mage_XmlConnect_IndexController
  • Mage_XmlConnect_Model_Adminhtml_System_Config_Backend_Baseurl
  • Mage_XmlConnect_Model_Adminhtml_System_Config_Backend_Currency_Default
  • Mage_XmlConnect_Model_Application
  • Mage_XmlConnect_Model_Catalog_Category_Image
  • Mage_XmlConnect_Model_ConfigData
  • Mage_XmlConnect_Model_History
  • Mage_XmlConnect_Model_Mysql4_Application
  • Mage_XmlConnect_Model_Mysql4_Application_Collection
  • Mage_XmlConnect_Model_Mysql4_Cms_Page_Collection
  • Mage_XmlConnect_Model_Mysql4_ConfigData
  • Mage_XmlConnect_Model_Mysql4_ConfigData_Collection
  • Mage_XmlConnect_Model_Mysql4_Filter_Collection
  • Mage_XmlConnect_Model_Mysql4_History
  • Mage_XmlConnect_Model_Mysql4_History_Collection
  • Mage_XmlConnect_Model_Mysql4_Queue
  • Mage_XmlConnect_Model_Mysql4_Queue_Collection
  • Mage_XmlConnect_Model_Mysql4_Setup
  • Mage_XmlConnect_Model_Mysql4_Template
  • Mage_XmlConnect_Model_Mysql4_Template_Collection
  • Mage_XmlConnect_Model_Observer
  • Mage_XmlConnect_Model_Payment_Method_Paypal_Config
  • Mage_XmlConnect_Model_Payment_Method_Paypal_Mecl
  • Mage_XmlConnect_Model_Payment_Method_Paypal_Mep
  • Mage_XmlConnect_Model_Paypal_Mecl_Checkout
  • Mage_XmlConnect_Model_Paypal_Mep_Checkout
  • Mage_XmlConnect_Model_Preview_Abstract
  • Mage_XmlConnect_Model_Preview_Android
  • Mage_XmlConnect_Model_Preview_Ipad
  • Mage_XmlConnect_Model_Preview_Iphone
  • Mage_XmlConnect_Model_Queue
  • Mage_XmlConnect_Model_Resource_Application
  • Mage_XmlConnect_Model_Resource_Application_Collection
  • Mage_XmlConnect_Model_Resource_Cms_Page_Collection
  • Mage_XmlConnect_Model_Resource_ConfigData
  • Mage_XmlConnect_Model_Resource_ConfigData_Collection
  • Mage_XmlConnect_Model_Resource_Filter_Collection
  • Mage_XmlConnect_Model_Resource_History
  • Mage_XmlConnect_Model_Resource_History_Collection
  • Mage_XmlConnect_Model_Resource_Queue
  • Mage_XmlConnect_Model_Resource_Queue_Collection
  • Mage_XmlConnect_Model_Resource_Setup
  • Mage_XmlConnect_Model_Resource_Template
  • Mage_XmlConnect_Model_Resource_Template_Collection
  • Mage_XmlConnect_Model_Simplexml_Element
  • Mage_XmlConnect_Model_Simplexml_Form
  • Mage_XmlConnect_Model_Simplexml_Form_Abstract
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Abstract
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Checkbox
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Collection
  • Mage_XmlConnect_Model_Simplexml_Form_Element_CountryListSelect
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Date
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Email
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset
  • Mage_XmlConnect_Model_Simplexml_Form_Element_File
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Image
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Multiline
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Multiselect
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Select
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Text
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Textarea
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Validator
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Validator_Abstract
  • Mage_XmlConnect_Model_Simplexml_Form_Element_Validator_Rule
  • Mage_XmlConnect_Model_Tabs
  • Mage_XmlConnect_Model_Template
  • Mage_XmlConnect_Model_Theme
  • Mage_XmlConnect_Paypal_MeclController
  • Mage_XmlConnect_Paypal_MepController
  • Mage_XmlConnect_PbridgeController
  • Mage_XmlConnect_ReviewController
  • Mage_XmlConnect_WishlistController

Interfaces

  • Mage_XmlConnect_Model_Simplexml_Form_Element_Renderer_Interface
  • 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_XmlConnect
 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:  * Device preview model abstract
 29:  *
 30:  * @category    Mage
 31:  * @package     Mage_XmlConnect
 32:  * @author      Magento Core Team <core@magentocommerce.com>
 33:  */
 34: abstract class Mage_XmlConnect_Model_Preview_Abstract extends Varien_Object
 35: {
 36:     /**
 37:      * Current active tab according preview action
 38:      *
 39:      * @var bool|string
 40:      */
 41:     private $_activeTab = false;
 42: 
 43:     /**
 44:      * Category item tint color styles
 45:      *
 46:      * @var string
 47:      */
 48:     protected $_categoryItemTintColor = '';
 49: 
 50:     /**
 51:      * Current loaded application model
 52:      *
 53:      * @var Mage_XmlConnect_Model_Application|null
 54:      */
 55:     protected $_appModel = null;
 56: 
 57:     /**
 58:      * Internal constructor not depended on params.
 59:      * It's used for application object initialization
 60:      *
 61:      * @return null
 62:      */
 63:     final function _construct()
 64:     {
 65:         parent::_construct();
 66:         $this->setApplicationModel();
 67:     }
 68: 
 69:     /**
 70:      * Setter for current loaded application model
 71:      *
 72:      * @return Mage_XmlConnect_Model_Preview_Abstract
 73:      */
 74:     protected function setApplicationModel()
 75:     {
 76:         if ($this->_appModel === null) {
 77:             $this->_appModel = Mage::helper('xmlconnect')->getApplication();
 78:         }
 79:         return $this;
 80:     }
 81: 
 82: 
 83:     /**
 84:      * Getter for current loaded application model
 85:      *
 86:      * @return Mage_XmlConnect_Model_Application
 87:      */
 88:     public function getApplicationModel()
 89:     {
 90:         return $this->setApplicationModel()->_appModel;
 91:     }
 92: 
 93:     /**
 94:      * Set active tab
 95:      *
 96:      * @param string $tab
 97:      * @return Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Tabitems
 98:      */
 99:     public function setActiveTab($tab)
100:     {
101:         $this->_activeTab = $tab;
102:         return $this;
103:     }
104: 
105:     /**
106:      * Check is exists a tab in a config array
107:      *
108:      * @param string $tabAction tab action name
109:      * @return bool
110:      */
111:     public function isItemExists($tabAction)
112:     {
113:         $tabs = $this->getTabItems();
114:         return (bool) isset($tabs[$tabAction]);
115:     }
116: 
117:     /**
118:      * Collect tab items array
119:      *
120:      * @return array
121:      */
122:     public function getTabItems()
123:     {
124:         $items = array();
125:         $model = $this->getApplicationModel();
126:         $tabs = $model->getEnabledTabsArray();
127:         $tabLimit = (int) Mage::getStoreConfig('xmlconnect/devices/'.strtolower($model->getType()).'/tab_limit');
128:         $showedTabs = 0;
129:         foreach ($tabs as $tab) {
130:             if (++$showedTabs > $tabLimit) {
131:                 break;
132:             }
133:             $items[$tab->action] = array(
134:                 'label' => Mage::helper('xmlconnect')->getTabLabel($tab->action),
135:                 'image' => $tab->image,
136:                 'action' => $tab->action,
137:                 'active' => strtolower($tab->action) == strtolower($this->_activeTab),
138:             );
139:         }
140:         return $items;
141:     }
142: 
143:     /**
144:      * Prepare config data
145:      * Implement set "conf" data as magic method
146:      *
147:      * @param array $conf
148:      */
149:     public function setConf($conf)
150:     {
151:         if (!is_array($conf)) {
152:             $conf = array();
153:         }
154:         $tabs = isset($conf['tabBar']['tabs']) ? $conf['tabBar']['tabs'] : false;
155:         if ($tabs !== false) {
156:             foreach ($tabs->getEnabledTabs() as $tab) {
157:                 $tab = (array) $tab;
158:                 $conf['tabBar'][$tab['action']]['label'] = $tab['label'];
159:                 $conf['tabBar'][$tab['action']]['image'] = $this->getPreviewImagesUrl($tab['image']);
160:             }
161:         }
162:         $this->setData('conf', $conf);
163:     }
164: 
165:    /**
166:     * Get preview images url
167:     *
168:     * @param string $name file name
169:     * @return string
170:     */
171:     public function getPreviewImagesUrl($name = '')
172:     {
173:         return Mage::helper('xmlconnect/image')->getSkinImagesUrl('mobile_preview/' . $name);
174:     }
175: 
176:     /**
177:      * Get application banner image url
178:      *
179:      * @return string
180:      */
181:     abstract public function getBannerImage();
182: 
183:     /**
184:      * Get background image url
185:      *
186:      * @return string
187:      */
188:     abstract public function getBackgroundImage();
189: 
190:     /**
191:      * Get font info from a config
192:      *
193:      * @param string $path
194:      * @return string
195:      */
196:     public function getConfigFontInfo($path)
197:     {
198:         return $this->getData('conf/fonts/' . $path);
199:     }
200: 
201:     /**
202:      * Get icon logo url
203:      *
204:      * @return string
205:      */
206:     public function getLogoUrl()
207:     {
208:         $configPath = 'conf/navigationBar/icon';
209:         if ($this->getData($configPath)) {
210:             return $this->getData($configPath);
211:         } else {
212:             return $this->getPreviewImagesUrl('smallIcon.png');
213:         }
214:     }
215: 
216:     /**
217:      * Get category item tint color styles
218:      *
219:      * @return string
220:      */
221:     public function getCategoryItemTintColor()
222:     {
223:         if (!strlen($this->_categoryItemTintColor)) {
224:             $percent = 0.4;
225:             $mask   = 255;
226: 
227:             $hex    = str_replace('#', '', $this->getData('conf/categoryItem/tintColor'));
228:             $hex2   = '';
229:             $_rgb   = array();
230: 
231:             $hexChars = '[a-fA-F0-9]';
232: 
233:             if (preg_match("/^($hexChars{2})($hexChars{2})($hexChars{2})$/", $hex, $rgb)) {
234:                 $_rgb = array(hexdec($rgb[1]), hexdec($rgb[2]), hexdec($rgb[3]));
235:             } elseif (preg_match("/^($hexChars)($hexChars)($hexChars)$/", $hex, $rgb)) {
236:                 $_rgb = array(hexdec($rgb[1] . $rgb[1]), hexdec($rgb[2] . $rgb[2]), hexdec($rgb[3] . $rgb[3]));
237:             }
238: 
239:             for ($i = 0; $i < 3; $i++) {
240:                 $_rgb[$i] = round($_rgb[$i] * $percent) + round($mask * (1 - $percent));
241:                 if ($_rgb[$i] > 255) {
242:                     $_rgb[$i] = 255;
243:                 }
244:                 $hex_digit = dechex($_rgb[$i]);
245:                 if (strlen($hex_digit) == 1) {
246:                     $hex_digit = "0" . $hex_digit;
247:                 }
248:                 $hex2 .= $hex_digit;
249:             }
250: 
251:             if ($hex && $hex2) {
252:                 // for IE
253:                 $this->_categoryItemTintColor .= "filter: progid:DXImageTransform.Microsoft.gradient";
254:                 $this->_categoryItemTintColor .= "(startColorstr='#" . $hex2 . "', endColorstr='#" . $hex . "');";
255:                 // for webkit browsers
256:                 $this->_categoryItemTintColor .= "background:-webkit-gradient";
257:                 $this->_categoryItemTintColor .= "(linear, left top, left bottom,";
258:                 $this->_categoryItemTintColor .= " from(#" . $hex2 . "), to(#" . $hex . "));";
259:                 // for firefox
260:                 $this->_categoryItemTintColor .= "background:-moz-linear-gradient";
261:                 $this->_categoryItemTintColor .= "(top, #" . $hex2 . ", #" . $hex . ");";
262:             }
263:         }
264:         return $this->_categoryItemTintColor;
265:     }
266: }
267: 
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0