當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AbstractElement::getComment方法代碼示例

本文整理匯總了PHP中Magento\Framework\Data\Form\Element\AbstractElement::getComment方法的典型用法代碼示例。如果您正苦於以下問題:PHP AbstractElement::getComment方法的具體用法?PHP AbstractElement::getComment怎麽用?PHP AbstractElement::getComment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Framework\Data\Form\Element\AbstractElement的用法示例。


在下文中一共展示了AbstractElement::getComment方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _getHeaderCommentHtml

 /**
  * Return header comment part of html for fieldset
  *
  * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
  * @return string
  */
 protected function _getHeaderCommentHtml($element)
 {
     $beforeDiv = '<div style="padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;">';
     $afterDiv = '</div>';
     $synch = __('Click here to <a href="%1">Synchronize</a> with ShipperHQ.', $this->getUrl('shipperhq/synchronize/index'));
     $element->getComment() ? $comment = $element->getComment() : ($comment = '');
     $html = $beforeDiv . '<table>
         <tr>
             <td style="vertical-align:bottom">
             <b>ShipperHQ installed version ' . $this->getModuleVersion() . '</b>
              </td>
         </tr>
         <tr>
          <td colspan="3">
             <p>' . $comment . '</p>
           </td>
         </tr>
         <tr>
             <td colspan="3">
             <p>' . $synch . '</p>
             </td>
         </tr>
         </table>' . $afterDiv;
     return $html;
 }
開發者ID:shipperhq,項目名稱:module-shipper,代碼行數:31,代碼來源:About.php

示例2: _getHeaderTitleHtml

 /**
  * Return header title part of html for payment solution
  *
  * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
  * @return string
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
 protected function _getHeaderTitleHtml($element)
 {
     $html = '<div class="config-heading EMerchantPayCheckout" ><div class="headingEMerchantPay"><strong>' . $element->getLegend();
     $html .= '</strong>';
     if ($element->getComment()) {
         $html .= '<span class="heading-intro">' . $element->getComment() . '</span>';
     }
     $html .= '</div>';
     $htmlId = $element->getHtmlId();
     $html .= '<div class="button-container"><button type="button"' . ' class="button action-configure' . '" id="' . $htmlId . '-head" onclick="showHideEMPPaymentSolution.call(this, \'' . $htmlId . '\'); return false;"><span class="state-closed">' . __('Configure') . '</span><span class="state-opened">' . __('Collapse') . '</span></button>';
     $html .= '</div></div>';
     return $html;
 }
開發者ID:emerchantpay,項目名稱:magento2-emp-plugin,代碼行數:20,代碼來源:CheckoutPayment.php

示例3: _getHeaderCommentHtml

 /**
  * Return header comment part of html for fieldset
  *
  * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
  * @return string
  */
 protected function _getHeaderCommentHtml($element)
 {
     $groupConfig = $element->getGroup();
     if (empty($groupConfig['help_url']) || !$element->getComment()) {
         return parent::_getHeaderCommentHtml($element);
     }
     $html = '<div class="comment">' . $element->getComment() . ' <a target="_blank" href="' . $groupConfig['help_url'] . '">' . __('Help') . '</a></div>';
     return $html;
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:15,代碼來源:Group.php

示例4: _getHeaderTitleHtml

 /**
  * Return header title part of html for payment solution
  *
  * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
  * @return string
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
 protected function _getHeaderTitleHtml($element)
 {
     $html = '<div class="config-heading" ><div class="heading"><strong>' . $element->getLegend();
     $groupConfig = $element->getGroup();
     $html .= '</strong>';
     if ($element->getComment()) {
         $html .= '<span class="heading-intro">' . $element->getComment() . '</span>';
     }
     $html .= '</div>';
     $disabledAttributeString = $this->_isPaymentEnabled($element) ? '' : ' disabled="disabled"';
     $disabledClassString = $this->_isPaymentEnabled($element) ? '' : ' disabled';
     $htmlId = $element->getHtmlId();
     $html .= '<div class="button-container"><button type="button"' . $disabledAttributeString . ' class="button action-configure' . (empty($groupConfig['paypal_ec_separate']) ? '' : ' paypal-ec-separate') . $disabledClassString . '" id="' . $htmlId . '-head" onclick="paypalToggleSolution.call(this, \'' . $htmlId . "', '" . $this->getUrl('adminhtml/*/state') . '\'); return false;"><span class="state-closed">' . __('Configure') . '</span><span class="state-opened">' . __('Close') . '</span></button>';
     if (!empty($groupConfig['more_url'])) {
         $html .= '<a class="link-more" href="' . $groupConfig['more_url'] . '" target="_blank">' . __('Learn More') . '</a>';
     }
     if (!empty($groupConfig['demo_url'])) {
         $html .= '<a class="link-demo" href="' . $groupConfig['demo_url'] . '" target="_blank">' . __('View Demo') . '</a>';
     }
     $html .= '</div></div>';
     return $html;
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:29,代碼來源:Payment.php

示例5: _getHeaderCommentHtml

 /**
  * Return header comment part of html for fieldset
  *
  * @param AbstractElement $element
  * @return string
  */
 protected function _getHeaderCommentHtml($element)
 {
     return $element->getComment() ? '<div class="comment">' . $element->getComment() . '</div>' : '';
 }
開發者ID:Doability,項目名稱:magento2dev,代碼行數:10,代碼來源:Fieldset.php


注:本文中的Magento\Framework\Data\Form\Element\AbstractElement::getComment方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。