当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Adminhtml_Block_Template::_beforeToHtml方法代码示例

本文整理汇总了PHP中Mage_Adminhtml_Block_Template::_beforeToHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Template::_beforeToHtml方法的具体用法?PHP Mage_Adminhtml_Block_Template::_beforeToHtml怎么用?PHP Mage_Adminhtml_Block_Template::_beforeToHtml使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Adminhtml_Block_Template的用法示例。


在下文中一共展示了Mage_Adminhtml_Block_Template::_beforeToHtml方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _beforeToHtml

 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     $data = array('class' => 'close-btn', 'label' => Mage::helper('M2ePro')->__('Close'), 'onclick' => 'Windows.getFocusedWindow().close()');
     $this->setChild('close_btn', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data));
     return $this;
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:7,代码来源:Items.php

示例2: _beforeToHtml

 public function _beforeToHtml()
 {
     $this->_currency = Mage::getModel('directory/currency')->load(Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE));
     $this->_collection = Mage::getResourceModel('sales/sale_collection')->setCustomerFilter(Mage::registry('current_customer'))->setOrderStateFilter(Mage_Sales_Model_Order::STATE_CANCELED, true)->load();
     $this->_groupedCollection = array();
     foreach ($this->_collection as $sale) {
         if (!is_null($sale->getStoreId())) {
             $store = Mage::app()->getStore($sale->getStoreId());
             $websiteId = $store->getWebsiteId();
             $groupId = $store->getGroupId();
             $storeId = $store->getId();
             $sale->setWebsiteId($store->getWebsiteId());
             $sale->setWebsiteName($store->getWebsite()->getName());
             $sale->setGroupId($store->getGroupId());
             $sale->setGroupName($store->getGroup()->getName());
         } else {
             $websiteId = 0;
             $groupId = 0;
             $storeId = 0;
             $sale->setStoreName(Mage::helper('customer')->__('Deleted Stores'));
         }
         $this->_groupedCollection[$websiteId][$groupId][$storeId] = $sale;
         $this->_websiteCounts[$websiteId] = isset($this->_websiteCounts[$websiteId]) ? $this->_websiteCounts[$websiteId] + 1 : 1;
     }
     return parent::_beforeToHtml();
 }
开发者ID:jpbender,项目名称:mage_virtual,代码行数:26,代码来源:Sales.php

示例3: _beforeToHtml

 protected function _beforeToHtml()
 {
     //-------------------------------
     $defaultStoreId = Mage::helper('M2ePro/Magento_Store')->getDefaultStoreId();
     $countries = Mage::getModel('Adminhtml/System_Config_Source_Country')->toOptionArray();
     $countries[0] = array('value' => '', 'label' => '');
     $this->setData('countries', $countries);
     $this->setData('country', Mage::getStoreConfig('general/country/default', $defaultStoreId));
     //-------------------------------
     $userId = Mage::getSingleton('admin/session')->getUser()->getId();
     $user = Mage::getModel('admin/user')->load($userId)->getData();
     $tempPath = defined('Mage_Shipping_Model_Config::XML_PATH_ORIGIN_CITY') ? Mage_Shipping_Model_Config::XML_PATH_ORIGIN_CITY : 'shipping/origin/city';
     $user['city'] = Mage::getStoreConfig($tempPath, $defaultStoreId);
     $tempPath = defined('Mage_Shipping_Model_Config::XML_PATH_ORIGIN_POSTCODE') ? Mage_Shipping_Model_Config::XML_PATH_ORIGIN_POSTCODE : 'shipping/origin/postcode';
     $user['postal_code'] = Mage::getStoreConfig($tempPath, $defaultStoreId);
     $this->addData($user);
     //-------------------------------
     //-------------------------------
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Confirm'), 'onclick' => '', 'id' => 'license_popup_confirm_button'));
     $this->setChild('license_popup_confirm_button', $buttonBlock);
     //-------------------------------
     //-------------------------------
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Sign into eBay'), 'onclick' => '', 'id' => 'sign_into_ebay_button'));
     $this->setChild('sign_into_ebay_button', $buttonBlock);
     //-------------------------------
     //-------------------------------
     $url = 'https://scgi.ebay.com/ws/eBayISAPI.dll?RegisterEnterInfo&bizflow=2';
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Register for eBay'), 'onclick' => 'window.open(\'' . $url . '\',\'_blank\')', 'id' => 'register_on_ebay_button'));
     $this->setChild('register_on_ebay_button', $buttonBlock);
     //-------------------------------
     return parent::_beforeToHtml();
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:32,代码来源:Content.php

示例4: _beforeToHtml

 protected function _beforeToHtml()
 {
     $this->assign('form', $this->_form);
     $this->assign('element', $this->_element);
     $this->assign('formBlock', $this->_formBlock);
     return parent::_beforeToHtml();
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:7,代码来源:Element.php

示例5: _beforeToHtml

 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     $data = array('class' => 'save-btn', 'label' => Mage::helper('M2ePro')->__('Save'));
     $this->setChild('save_btn', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data));
     return $this;
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:7,代码来源:SetNotePopup.php

示例6: _beforeToHtml

 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     $data = array('class' => 'next', 'label' => Mage::helper('M2ePro')->__('Continue'), 'onclick' => "setLocation(M2ePro.url.get('adminhtml_ebay_listing_categorySettings'));");
     $this->setChild('continue_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data));
     return $this;
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:7,代码来源:WarningPopup.php

示例7: _beforeToHtml

 protected function _beforeToHtml()
 {
     if ($this->_getData('select_id') == '') {
         $this->setData('select_id', $this->getHtmlId() . '-select');
     }
     return parent::_beforeToHtml();
 }
开发者ID:aram93,项目名称:mage-enhanced-admin-grids,代码行数:7,代码来源:Select.php

示例8: _beforeToHtml

 protected function _beforeToHtml()
 {
     if ($this->isAllowedEdit()) {
         $this->setChild('rename_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Rename'), 'onclick' => 'window.location.href=\'' . Mage::helper('mzeis_documentation/page')->getRenameUrl($this->getPage()->getName()) . '\'', 'class' => 'edit')));
         $this->setChild('edit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Edit'), 'onclick' => 'window.location.href=\'' . Mage::helper('mzeis_documentation/page')->getEditUrl($this->getPage()->getName()) . '\'', 'class' => 'edit')));
     }
     return parent::_beforeToHtml();
 }
开发者ID:jhoelzl,项目名称:Mzeis_Documentation,代码行数:8,代码来源:View.php

示例9: _beforeToHtml

 protected function _beforeToHtml()
 {
     $this->setTemplate('newsletter/queue/edit.phtml');
     $this->setChild('form', $this->getLayout()->createBlock('adminhtml/newsletter_queue_edit_form', 'form'));
     $queue = AO::getSingleton('newsletter/queue');
     $queue->addTemplateData($queue);
     return parent::_beforeToHtml();
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:8,代码来源:Newsletter_Queue_Edit.php

示例10: _beforeToHtml

 protected function _beforeToHtml()
 {
     // ---------------------------------------
     $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('M2ePro')->__('Continue'), 'onclick' => '', 'id' => 'continue_button'));
     $this->setChild('continue_button', $buttonBlock);
     // ---------------------------------------
     return parent::_beforeToHtml();
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:8,代码来源:Content.php

示例11: _beforeToHtml

 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     $url = $this->getUrl('*/*/index', array('_current' => true, 'step' => 3));
     $data = array('class' => 'next', 'label' => Mage::helper('M2ePro')->__('Continue'), 'onclick' => 'setLocation(\'' . $url . '\')');
     $this->setChild('continue_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data));
     return $this;
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:8,代码来源:SkipPopup.php

示例12: _beforeToHtml

 /**
  * Retrieve required options from parent
  */
 protected function _beforeToHtml()
 {
     if (!$this->getParentBlock()) {
         Mage::throwException(Mage::helper('adminhtml')->__('Invalid parrent block for this block'));
     }
     $this->setPayment($this->getParentBlock()->getOrder()->getPayment());
     parent::_beforeToHtml();
 }
开发者ID:hunnybohara,项目名称:magento-chinese-localization,代码行数:11,代码来源:Payment.php

示例13: _beforeToHtml

 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     $this->_oldStoreId = Mage::app()->getStore()->getId();
     Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
     Mage::helper('udropship/catalog')->setDesignStore(0, 'adminhtml');
     return $this;
 }
开发者ID:xiaoguizhidao,项目名称:magento,代码行数:8,代码来源:Adminhtml.php

示例14: _beforeToHtml

 /**
  * Retrieve required options from parent
  */
 protected function _beforeToHtml()
 {
     if (!$this->getParentBlock()) {
         Mage::throwException(Mage::helper('adminhtml')->__('Invalid parent block for this block.'));
     }
     $this->setEntity($this->getParentBlock()->getSource());
     parent::_beforeToHtml();
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:11,代码来源:View.php

示例15: _beforeToHtml

 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     $data = array('class' => 'switch-to-parent-btn', 'label' => Mage::helper('M2ePro')->__('Yes'));
     $this->setChild('yes_btn', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data));
     $data = array('class' => 'switch-to-parent-popup-close', 'label' => Mage::helper('M2ePro')->__('No'));
     $this->setChild('no_btn', $this->getLayout()->createBlock('adminhtml/widget_button')->setData($data));
     return $this;
 }
开发者ID:giuseppemorelli,项目名称:magento-extension,代码行数:9,代码来源:SwitchToParentPopup.php


注:本文中的Mage_Adminhtml_Block_Template::_beforeToHtml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。