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


PHP AbstractElement::getLegend方法代码示例

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


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

示例1: _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 meli" ><div class="heading"><strong id="meli-logo">' . $element->getLegend();
     $html .= '</strong></div>';
     $html .= '<div class="button-container meli-cards"><button type="button"' . ' class="meli-payment-btn action-configure button' . '" id="' . $element->getHtmlId() . '-head" onclick="Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;"><span class="state-closed">' . __('Configure') . '</span><span class="state-opened">' . __('Close') . '</span></button></div></div>';
     return $html;
 }
开发者ID:SummaSolutions,项目名称:cart-magento2,代码行数:15,代码来源:Payment.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: _getHeaderTitleHtml

 /**
  * Return header title part of html for payment solution
  *
  * @param AbstractElement $element
  * @return string
  */
 protected function _getHeaderTitleHtml($element)
 {
     $isPaymentEnabled = '';
     $disabledLegend = '';
     if (!$this->_scopeConfig->isSetFlag(self::XML_PATH_STANDARD_ACTIVE)) {
         $isPaymentEnabled = 'disabled';
         $disabledLegend = __("Checkout Classic Method must be enabled");
     } else {
         if (!$this->_helper->isCountryEnabled()) {
             $isPaymentEnabled = 'disabled';
             $disabledLegend = __("MercadoEnvios is not enabled in the country where Mercado Pago is configured");
         }
     }
     $html = '<div class="config-heading" ><div class="heading"><strong id="meen-logo"><div class="meli-legend">' . $element->getLegend();
     $html .= '</div></strong>';
     $html .= '<div class="button-container"><button ' . $isPaymentEnabled . ' type="button"' . ' class="button meli-payment-btn action-configure ' . $isPaymentEnabled . ' ' . '" id="' . $element->getHtmlId() . '-head" onclick="Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;"><span class="state-closed">' . __('Configure') . '</span><span class="state-opened">' . __('Close') . '</span></button><div class="disabled-legend"> ' . $disabledLegend . '</div></div></div>';
     $html .= '</div>';
     return $html;
 }
开发者ID:SummaSolutions,项目名称:cart-magento2,代码行数:25,代码来源:Carrier.php

示例4: _getHeaderTitleHtml

 /**
  * Return header title part of html for payment solution
  *
  * @param \Magento\Framework\Data\Form\Element\AbstractElement $element
  * @return string
  */
 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:aiesh,项目名称:magento2,代码行数:28,代码来源:Payment.php

示例5: _getHeaderHtml

 /**
  * @param AbstractElement $element
  * @return string
  * @SuppressWarnings(PHPMD.UnusedLocalVariable)
  */
 protected function _getHeaderHtml($element)
 {
     $id = $element->getHtmlId();
     $default = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');
     $html = '<h4 class="icon-head head-edit-form">' . $element->getLegend() . '</h4>';
     $html .= '<fieldset class="config" id="' . $element->getHtmlId() . '">';
     $html .= '<legend>' . $element->getLegend() . '</legend>';
     // field label column
     $html .= '<table cellspacing="0"><colgroup class="label" /><colgroup class="value" />';
     if (!$default) {
         $html .= '<colgroup class="use-default" />';
     }
     $html .= '<tbody>';
     return $html;
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:20,代码来源:Watermark.php

示例6: _getHeaderTitleHtml

 /**
  * Return header title part of html for fieldset
  *
  * @param AbstractElement $element
  * @return string
  */
 protected function _getHeaderTitleHtml($element)
 {
     return '<a id="' . $element->getHtmlId() . '-head" href="#' . $element->getHtmlId() . '-link" onclick="Fieldset.toggleCollapse(\'' . $element->getHtmlId() . '\', \'' . $this->getUrl('*/*/state') . '\'); return false;">' . $element->getLegend() . '</a>';
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:10,代码来源:Fieldset.php


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