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_Connect_Adminhtml_Extension_CustomController
  • Mage_Connect_Adminhtml_Extension_LocalController
  • Mage_Connect_Block_Adminhtml_Extension_Custom_Edit
  • Mage_Connect_Block_Adminhtml_Extension_Custom_Edit_Form
  • Mage_Connect_Block_Adminhtml_Extension_Custom_Edit_Tab_Abstract
  • Mage_Connect_Block_Adminhtml_Extension_Custom_Edit_Tab_Authors
  • Mage_Connect_Block_Adminhtml_Extension_Custom_Edit_Tab_Contents
  • Mage_Connect_Block_Adminhtml_Extension_Custom_Edit_Tab_Depends
  • Mage_Connect_Block_Adminhtml_Extension_Custom_Edit_Tab_Grid
  • Mage_Connect_Block_Adminhtml_Extension_Custom_Edit_Tab_Load
  • Mage_Connect_Block_Adminhtml_Extension_Custom_Edit_Tab_Local
  • Mage_Connect_Block_Adminhtml_Extension_Custom_Edit_Tab_Package
  • Mage_Connect_Block_Adminhtml_Extension_Custom_Edit_Tab_Release
  • Mage_Connect_Block_Adminhtml_Extension_Custom_Edit_Tabs
  • Mage_Connect_Helper_Data
  • Mage_Connect_Model_Extension
  • Mage_Connect_Model_Extension_Collection
  • Mage_Connect_Model_Session
  • 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_Connect
 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:  * Abstract for extension info tabs
 29:  *
 30:  * @category    Mage
 31:  * @package     Mage_Connect
 32:  * @author      Magento Core Team <core@magentocommerce.com>
 33:  */
 34: abstract class Mage_Connect_Block_Adminhtml_Extension_Custom_Edit_Tab_Abstract
 35:     extends Mage_Adminhtml_Block_Widget_Form
 36:     implements Mage_Adminhtml_Block_Widget_Tab_Interface
 37: {
 38:     /**
 39:      * TODO
 40:      */
 41:     protected $_addRowButtonHtml;
 42: 
 43:     /**
 44:      * TODO
 45:      */
 46:     protected $_removeRowButtonHtml;
 47: 
 48:     /**
 49:      * TODO
 50:      */
 51:     protected $_addFileDepButtonHtml;
 52: 
 53:     /**
 54:      * TODO
 55:      */
 56:     public function __construct()
 57:     {
 58:         parent::__construct();
 59:         $this->setData(Mage::getSingleton('connect/session')->getCustomExtensionPackageFormData());
 60:     }
 61: 
 62:     /**
 63:      * TODO   remove ???
 64:      */
 65:     public function initForm()
 66:     {
 67:         return $this;
 68:     }
 69: 
 70:     /**
 71:      * TODO
 72:      */
 73:     public function getValue($key, $default='')
 74:     {
 75:         $value = $this->getData($key);
 76:         return htmlspecialchars($value ? $value : $default);
 77:     }
 78: 
 79:     /**
 80:      * TODO
 81:      */
 82:     public function getSelected($key, $value)
 83:     {
 84:         return $this->getData($key)==$value ? 'selected="selected"' : '';
 85:     }
 86: 
 87:     /**
 88:      * TODO
 89:      */
 90:     public function getChecked($key)
 91:     {
 92:         return $this->getData($key) ? 'checked="checked"' : '';
 93:     }
 94: 
 95:     /**
 96:      * TODO
 97:      */
 98:     public function getAddRowButtonHtml($container, $template, $title='Add')
 99:     {
100:         if (!isset($this->_addRowButtonHtml[$container])) {
101:             $this->_addRowButtonHtml[$container] = $this->getLayout()
102:                 ->createBlock('adminhtml/widget_button')
103:                     ->setType('button')
104:                     ->setClass('add')
105:                     ->setLabel($this->__($title))
106:                     ->setOnClick("addRow('".$container."', '".$template."')")
107:                     ->toHtml();
108:         }
109:         return $this->_addRowButtonHtml[$container];
110:     }
111: 
112:     /**
113:      * TODO
114:      */
115:     public function getRemoveRowButtonHtml($selector='span')
116:     {
117:         if (!$this->_removeRowButtonHtml) {
118:             $this->_removeRowButtonHtml = $this->getLayout()
119:                 ->createBlock('adminhtml/widget_button')
120:                     ->setType('button')
121:                     ->setClass('delete')
122:                     ->setLabel($this->__('Remove'))
123:                     ->setOnClick("removeRow(this, '".$selector."')")
124:                     ->toHtml();
125:         }
126:         return $this->_removeRowButtonHtml;
127:     }
128: 
129:     public function getAddFileDepsRowButtonHtml($selector='span', $filesClass='files')
130:     {
131:         if (!$this->_addFileDepButtonHtml) {
132:             $this->_addFileDepButtonHtml = $this->getLayout()
133:                 ->createBlock('adminhtml/widget_button')
134:                     ->setType('button')
135:                     ->setClass('add')
136:                     ->setLabel($this->__('Add files'))
137:                     ->setOnClick("showHideFiles(this, '".$selector."', '".$filesClass."')")
138:                     ->toHtml();
139:         }
140:         return $this->_addFileDepButtonHtml;
141: 
142:     }
143: 
144:     /**
145:      * Get Tab Label
146:      *
147:      * @return string
148:      */
149:     public function getTabLabel()
150:     {
151:         return '';
152:     }
153: 
154:     /**
155:      * Get Tab Title
156:      *
157:      * @return string
158:      */
159:     public function getTabTitle()
160:     {
161:         return '';
162:     }
163: 
164:     public function canShowTab()
165:     {
166:         return true;
167:     }
168: 
169:     public function isHidden()
170:     {
171:         return false;
172:     }
173: }
174: 
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0