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