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


PHP Template::_toHtml方法代码示例

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


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

示例1: _toHtml

 /**
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->getActiveMenu()) {
         return parent::_toHtml();
     }
     return false;
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:10,代码来源:Menu.php

示例2: _toHtml

 /**
  * Render block
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (count($this->_messages->getUnread())) {
         return parent::_toHtml();
     }
     return '';
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:12,代码来源:UnreadMessagePopup.php

示例3: _toHtml

 /**
  * Render block
  *
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->canShow()) {
         $this->setHeaderText($this->escapeHtml(__('Incoming Message')));
         $this->setCloseText($this->escapeHtml(__('close')));
         $this->setReadDetailsText($this->escapeHtml(__('Read Details')));
         $this->setNoticeMessageText($this->escapeHtml($this->_getLatestItem()->getTitle()));
         $this->setNoticeMessageUrl($this->escapeUrl($this->_getLatestItem()->getUrl()));
         $this->setSeverityText('critical');
         return parent::_toHtml();
     }
     return '';
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:18,代码来源:Window.php

示例4: _toHtml

 /**
  * Prepare HTML
  *
  * @return string
  */
 protected function _toHtml()
 {
     $this->_eventManager->dispatch('adminhtml_catalog_product_attribute_set_main_html_before', ['block' => $this]);
     return parent::_toHtml();
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:10,代码来源:Main.php

示例5: _toHtml

 /**
  * @return string
  */
 protected function _toHtml()
 {
     return $this->getPayment()->getMethod() === Directpost::METHOD_CODE ? parent::_toHtml() : '';
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:7,代码来源:FraudDetails.php

示例6: _toHtml

 /**
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->isShow()) {
         return parent::_toHtml();
     }
     return '';
 }
开发者ID:koliaGI,项目名称:magento2,代码行数:10,代码来源:Switcher.php

示例7: _toHtml

 /**
  * @return string
  */
 protected function _toHtml()
 {
     return $this->getPayment()->getMethod() === \Tco\Checkout\Model\Checkout::CODE || $this->getPayment()->getMethod() === \Tco\Checkout\Model\Api::CODE ? parent::_toHtml() : '';
 }
开发者ID:craigchristenson,项目名称:magento2-2checkout,代码行数:7,代码来源:TransactionDetails.php

示例8: _toHtml

 /**
  * Set data to block
  *
  * @return string
  */
 protected function _toHtml()
 {
     $agreement = $this->_getBillingAgreement();
     $this->setReferenceId($agreement->getReferenceId());
     $customerId = $agreement->getCustomerId();
     $customer = $this->_customerAccountService->getCustomer($customerId);
     $this->setCustomerEmail($customer->getEmail());
     $this->setCustomerUrl($this->getUrl('customer/index/edit', array('id' => $customerId)));
     $this->setStatus($agreement->getStatusLabel());
     $this->setCreatedAt($this->formatDate($agreement->getCreatedAt(), 'short', true));
     $this->setUpdatedAt($agreement->getUpdatedAt() ? $this->formatDate($agreement->getUpdatedAt(), 'short', true) : __('N/A'));
     return parent::_toHtml();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:18,代码来源:Info.php

示例9: _toHtml

 /**
  * Set data to block
  *
  * @return string
  */
 protected function _toHtml()
 {
     $agreement = $this->_getBillingAgreement();
     $this->setReferenceId($agreement->getReferenceId());
     $customerId = $agreement->getCustomerId();
     $customer = $this->_customerRepository->getById($customerId);
     $this->setCustomerEmail($customer->getEmail());
     $this->setCustomerUrl($this->getUrl('customer/index/edit', ['id' => $customerId]));
     $this->setStatus($agreement->getStatusLabel());
     $this->setCreatedAt($this->formatDate($agreement->getCreatedAt(), \IntlDateFormatter::SHORT, true));
     $this->setUpdatedAt($agreement->getUpdatedAt() ? $this->formatDate($agreement->getUpdatedAt(), \IntlDateFormatter::SHORT, true) : __('N/A'));
     return parent::_toHtml();
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:18,代码来源:Info.php

示例10: _toHtml

 /**
  * Prepare html output
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (!$this->_storeManager->isSingleStoreMode()) {
         return parent::_toHtml();
     }
     return '';
 }
开发者ID:aiesh,项目名称:magento2,代码行数:12,代码来源:Switcher.php


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