當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。