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


PHP Template::_beforeToHtml方法代码示例

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


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

示例1: _beforeToHtml

 /**
  * {@inheritdoc}
  */
 protected function _beforeToHtml()
 {
     $this->assign('form', $this->_form);
     $this->assign('element', $this->_element);
     $this->assign('formBlock', $this->_formBlock);
     return parent::_beforeToHtml();
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:10,代码来源:Element.php

示例2: _beforeToHtml

 /**
  * Retrieve required options from parent
  *
  * @return void
  * @throws \Magento\Framework\Exception\LocalizedException
  */
 protected function _beforeToHtml()
 {
     if (!$this->getParentBlock()) {
         throw new \Magento\Framework\Exception\LocalizedException(__('Please correct the parent block for this block.'));
     }
     $this->setEntity($this->getParentBlock()->getSource());
     parent::_beforeToHtml();
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:14,代码来源:View.php

示例3: _beforeToHtml

 /**
  * Retrieve required options from parent
  *
  * @return void
  * @throws \Magento\Framework\Model\Exception
  */
 protected function _beforeToHtml()
 {
     if (!$this->getParentBlock()) {
         throw new \Magento\Framework\Model\Exception(__('Invalid parent block for this block'));
     }
     $this->setPayment($this->getParentBlock()->getOrder()->getPayment());
     parent::_beforeToHtml();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:14,代码来源:Payment.php

示例4: _beforeToHtml

 /**
  * Before rendering html, but after trying to load cache
  *
  * @return AbstractBlock
  */
 protected function _beforeToHtml()
 {
     $this->setChild('form', $this->getLayout()->createBlock('Magento\\Newsletter\\Block\\Adminhtml\\Queue\\Edit\\Form', 'form'));
     return parent::_beforeToHtml();
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:10,代码来源:Edit.php

示例5: _beforeToHtml

 /**
  * {@inheritdoc}
  */
 protected function _beforeToHtml()
 {
     // TODO - Moved to Beta 2, no breadcrumbs displaying in Beta 1
     // $this->assign('links', $this->_links);
     return parent::_beforeToHtml();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:9,代码来源:Breadcrumbs.php

示例6: _beforeToHtml

 /**
  * Execute before toHtml() code.
  *
  * @return $this
  */
 public function _beforeToHtml()
 {
     $this->_currency = $this->_currencyFactory->create()->load($this->_scopeConfig->getValue(Currency::XML_PATH_CURRENCY_BASE, \Magento\Store\Model\ScopeInterface::SCOPE_STORE));
     $this->_collection = $this->_collectionFactory->create()->setCustomerIdFilter((int) $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID))->setOrderStateFilter(Order::STATE_CANCELED, true)->load();
     $this->_groupedCollection = [];
     foreach ($this->_collection as $sale) {
         if ($sale->getStoreId() !== null) {
             $store = $this->_storeManager->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(__('Deleted Stores'));
         }
         $this->_groupedCollection[$websiteId][$groupId][$storeId] = $sale;
         $this->_websiteCounts[$websiteId] = isset($this->_websiteCounts[$websiteId]) ? $this->_websiteCounts[$websiteId] + 1 : 1;
     }
     return parent::_beforeToHtml();
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:31,代码来源:Sales.php

示例7: _beforeToHtml

 /**
  * @return $this
  */
 public function _beforeToHtml()
 {
     return parent::_beforeToHtml();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:7,代码来源:Online.php

示例8: _beforeToHtml

 /**
  * Prepares block to render
  *
  * @return $this
  */
 protected function _beforeToHtml()
 {
     return parent::_beforeToHtml();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:9,代码来源:Subscriber.php


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