本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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>';
}