本文整理汇总了PHP中Mage_Adminhtml_Block_Abstract类的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Abstract类的具体用法?PHP Mage_Adminhtml_Block_Abstract怎么用?PHP Mage_Adminhtml_Block_Abstract使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Mage_Adminhtml_Block_Abstract类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _toHtml
/**
* Do a few checks to see if the template should be rendered before actually rendering it.
*
* @return string
*
* @see Mage_Adminhtml_Block_Abstract::_toHtml()
*/
protected function _toHtml()
{
$shipment = Mage::registry('current_shipment');
$helper = Mage::helper('tig_myparcel');
if (!$helper->isEnabled() || !$shipment || !$helper->shippingMethodIsMyParcel($shipment->getOrder()->getShippingMethod())) {
return '';
}
return parent::_toHtml();
}
示例2: _toHtml
/**
* Do a few checks to see if the template should be rendered before actually rendering it.
*
* @return string
*
* @see Mage_Adminhtml_Block_Abstract::_toHtml()
*/
protected function _toHtml()
{
$shippingMethod = $this->_order->getShippingMethod();
if (!$this->_helper->isEnabled() || !$this->_order || !$this->_helper->shippingMethodIsMyParcel($shippingMethod)) {
return '';
}
return parent::_toHtml();
}
示例3: _prepareLayout
protected function _prepareLayout()
{
parent::_prepareLayout();
if (!Mage::helper('udropship')->isModuleActive('Unirgy_DropshipMicrosite') || !Mage::helper('umicrosite')->getCurrentVendor()) {
$this->getLayout()->getBlock('product_tabs')->addTab('udmulti_vendors', 'udmulti/adminhtml_product_vendors');
}
}
示例4: __construct
public function __construct()
{
parent::__construct();
$id = $this->getRequest()->getParam('currentProductId');
$this->ebayListingProduct = Mage::helper('M2ePro/Component_Ebay')->getObject('Listing_Product', $id)->getChildObject();
$this->setTemplate('M2ePro/ebay/listing/preview.phtml');
}
示例5: _prepareLayout
protected function _prepareLayout()
{
$this->runUpdate();
$this->setTemplate('googlebasefeedgenerator/system/process.phtml');
parent::_prepareLayout();
return $this;
}
示例6: _prepareLayout
protected function _prepareLayout()
{
$this->getLayout()->getBlock('head')->addCss(self::SYSTEM_CONFIG_EDIT_CSS_FILE);
/**
* For Magento 1.6 and 1.11 we need to add another css file.
*/
$helper = Mage::helper('tig_myparcel');
$isEnterprise = $helper->isEnterprise();
/**
* Get the minimum version requirement for the current Magento edition.
*/
if ($isEnterprise) {
$minimumVersion = '1.12.0.0';
} else {
$minimumVersion = '1.7.0.0';
}
/**
* Check if the current version is below the minimum version requirement.
*/
$isBelowMinimumVersion = version_compare(Mage::getVersion(), $minimumVersion, '<');
if ($isBelowMinimumVersion) {
$this->getLayout()->getBlock('head')->addCss(self::MAGENTO_16_CSS_FILE);
}
return parent::_prepareLayout();
}
示例7: getOrder
public function getOrder()
{
$order = parent::getOrder();
if ($order) {
return $order;
}
return Mage::registry('current_order');
}
示例8: _toHtml
/**
* It was decided to use the overwritable _toHtml instead of a template
* to be consistent with magento renderers and to increase portability
*
* @return string
*/
protected function _toHtml()
{
$html = parent::_toHtml();
$html .= "<form id='{$this->getFormId()}' action='{$this->getFormAction()}' method='post' class='{$this->getFormClass()}' enctype='multipart/form-data'>";
$minigrid = new BlueAcorn_MiniGrid_Block_System_Config_Form_Field_Minigrid();
$html .= $minigrid->getElementHtml("ba-minigrid-form-grid", $this->getFieldName(), $this->getGridFields(), $this->getGridRowData());
$html .= "\n </form>\n <script type='text/javascript'>\n function submitMinigridForm() {\n \$('{$this->getFormId()}').submit();\n }\n </script>\n\n";
return $html;
}
示例9: _prepareLayout
protected function _prepareLayout()
{
$this->setChild('reply', $this->getLayout()->createBlock('aw_hdu3/adminhtml_ticket_edit_form_reply'));
$this->setChild('thread', $this->getLayout()->createBlock('aw_hdu3/adminhtml_ticket_edit_form_thread'));
$this->setChild('details', $this->getLayout()->createBlock('aw_hdu3/adminhtml_ticket_edit_form_details'));
$this->setChild('customer_summary', $this->getLayout()->createBlock('aw_hdu3/adminhtml_ticket_edit_form_customerSummary'));
$this->setChild('customer_orders', $this->getLayout()->createBlock('aw_hdu3/adminhtml_ticket_edit_form_customerOrders'));
$this->setChild('customer_tickets', $this->getLayout()->createBlock('aw_hdu3/adminhtml_ticket_edit_form_customerTickets'));
return parent::_prepareLayout();
}
示例10: _prepareLayout
protected function _prepareLayout()
{
$this->getLayout()->getBlock('head')->addJs('web2print/resourcebrowser.js');
$this->getLayout()->getBlock('head')->addCss('css/resourcebrowser.css');
$this->getLayout()->getBlock('head')->addItem('js_css', 'prototype/windows/themes/default.css');
if (Mage::helper('web2print')->getMagentoVersionForCss()) {
$this->getLayout()->getBlock('head')->addCss('lib/prototype/windows/themes/magento.css');
} else {
$this->getLayout()->getBlock('head')->addItem('js_css', 'prototype/windows/themes/magento.css');
}
$block = $this->getLayout()->createBlock('Chili_Web2print_Block_System_Config_Form_Resourcebrowserbase', 'resourcebrowser_base');
$this->getLayout()->getBlock('content')->append($block);
return parent::_prepareLayout();
}
示例11: _construct
/**
* @see parent
*/
public function _construct()
{
parent::_construct();
$this->setTemplate('bronto/news/item.phtml');
}
示例12: __construct
/**
* Set template
*/
public function __construct()
{
parent::_prepareLayout();
$this->setTemplate('capayable/support.phtml');
}
示例13: setParentBlock
public function setParentBlock(Mage_Core_Block_Abstract $block)
{
$block->unsetChild('save_button');
return parent::setParentBlock($block);
}
示例14: __construct
public function __construct()
{
parent::__construct();
$this->setTemplate('crm/customtab.phtml');
}
示例15: _construct
/**
* Instantiate a recurring payment profile to use it as a helper
*/
protected function _construct()
{
$this->_profile = Mage::getSingleton('Mage_Sales_Model_Recurring_Profile');
return parent::_construct();
}