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


PHP Varien_Data_Form_Element_Abstract::getExplicitApply方法代码示例

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


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

示例1: render

 /**
  * Render element
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @see Varien_Data_Form_Element_Renderer_Interface::render()
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $element->addClass('element-value-changer');
     $valueName = $element->getValueName();
     if ($element instanceof Varien_Data_Form_Element_Select && $valueName == '...') {
         $optionValues = $element->getValues();
         foreach ($optionValues as $option) {
             if ($option['value'] === '') {
                 $valueName = $option['label'];
             }
         }
     }
     if ($valueName === '') {
         $valueName = '...';
     }
     if ($element->getShowAsText()) {
         $html = ' <input type="hidden" class="hidden" id="' . $element->getHtmlId() . '" name="' . $element->getName() . '" value="' . $element->getValue() . '"/> ' . htmlspecialchars($valueName) . '&nbsp;';
     } else {
         $html = ' <span class="rule-param"' . ($element->getParamId() ? ' id="' . $element->getParamId() . '"' : '') . '>' . '<a href="javascript:void(0)" class="label">';
         $translate = Mage::getSingleton('core/translate_inline');
         $html .= $translate->isAllowed() ? Mage::helper('core')->escapeHtml($valueName) : Mage::helper('core')->escapeHtml(Mage::helper('core/string')->truncate($valueName, 33, '...'));
         $html .= '</a><span class="element"> ' . $element->getElementHtml();
         if ($element->getExplicitApply()) {
             $html .= ' <a href="javascript:void(0)" class="rule-param-apply"><img src="' . $this->getSkinUrl('M2ePro/images/rule_component_apply.gif') . '" class="v-middle" alt="' . Mage::helper('M2ePro')->__('Apply') . '" title="' . Mage::helper('M2ePro')->__('Apply') . '" /></a> ';
         }
         $html .= '</span></span>&nbsp;';
     }
     return $html;
 }
开发者ID:ReeceCrossland,项目名称:essua-m2epro,代码行数:36,代码来源:Editable.php

示例2: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $element->addClass('element-value-changer');
     $valueName = $element->getValueName();
     if ($valueName === '') {
         $valueName = '...';
     }
     $valueLabel = htmlspecialchars(Mage::helper('core/string')->truncate($valueName, 150, '...'));
     switch ($this->getFormat()) {
         case 'text':
             $html = $valueLabel;
             break;
         case 'html':
             $html = '<strong>' . $valueLabel . '</strong>';
             break;
         default:
             if ($element->getIsMeta()) {
                 $html = '<input type="hidden" class="hidden" id="' . $element->getHtmlId() . '" name="' . $element->getName() . '" value="' . $element->getValue() . '"/>';
                 $html .= htmlspecialchars($valueName);
             } else {
                 $html = '<span class="rule-param"' . ($element->getParamId() ? ' id="' . $element->getParamId() . '"' : '') . '>';
                 $html .= '<a href="javascript:void(0)" class="label">' . $valueLabel . '</a>';
                 $html .= '<span class="element">';
                 $html .= $element->getElementHtml();
                 if ($element->getExplicitApply()) {
                     $html .= '<a href="javascript:void(0)" class="rule-param-apply"><img src="' . $this->getSkinUrl('images/rule_component_apply.gif') . '" class="v-middle" alt="' . $this->__('Apply') . '" title="' . $this->__('Apply') . '" /></a>';
                 }
                 $html .= '</span></span>';
             }
     }
     return $html;
 }
开发者ID:jsiefer,项目名称:emarketing,代码行数:32,代码来源:Editable.php

示例3: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $element->addClass('element-value-changer');
     $valueName = $element->getLabel();
     if ($valueName === '' || $valueName === null) {
         $valueName = '...';
     }
     if ($element->getShowAsText()) {
         $html = ' <input type="hidden" class="hidden" id="' . $element->getHtmlId() . '" name="' . $element->getName() . '" value="' . $element->getValue() . '"/> ' . htmlspecialchars($valueName) . '&nbsp;';
     } else {
         $html = '&nbsp;<span class="rule-param">';
         /** @var Mage_Core_Model_Translate_Inline $translate */
         $translate = Mage::getSingleton('core/translate_inline');
         if ($translate->isAllowed()) {
             $valueName = Mage::helper('core/string')->truncate($valueName, 33, '...');
         }
         $html .= '<a href="javascript:void(0)" class="label">';
         $html .= Mage::helper('core')->escapeHtml($valueName);
         $html .= '</a>';
         $html .= '<span class="element"> ';
         $html .= $element->getElementHtml();
         if ($element->getExplicitApply()) {
             /** @var Aoe_FraudManager_Helper_Data $helper */
             $helper = Mage::helper('Aoe_FraudManager/Data');
             $url = $helper->getConditionApplyImageUrl();
             $label = $helper->getConditionApplyLabel();
             $html .= ' <a href="javascript:void(0)" class="rule-param-apply">';
             $html .= '<img src="' . $url . '" class="v-middle" alt="' . $label . '" title="' . $label . '" />';
             $html .= '</a> ';
         }
         $html .= '</span>';
         $html .= '</span>&nbsp;';
     }
     return $html;
 }
开发者ID:aoepeople,项目名称:aoe_fraudmanager,代码行数:35,代码来源:Editable.php

示例4: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $element->addClass('element-value-changer');
     $valueName = $element->getValueName();
     if ($valueName === '') {
         $valueName = '...';
     }
     if ($element->getShowAsText()) {
         $html = ' <input type="hidden" class="hidden" id="' . $element->getHtmlId() . '" name="' . $element->getName() . '" value="' . $element->getValue() . '"/> ';
         $html .= htmlspecialchars($valueName) . '&nbsp;';
     } else {
         $html = ' <span class="rule-param"' . ($element->getParamId() ? ' id="' . $element->getParamId() . '"' : '') . '>';
         $html .= '<a href="javascript:void(0)" class="label">';
         $html .= htmlspecialchars(Mage::helper('core/string')->truncate($valueName, 33, '...'));
         $html .= '</a><span class="element"> ';
         $html .= $element->getElementHtml();
         if ($element->getExplicitApply()) {
             $html .= ' <a href="javascript:void(0)" class="rule-param-apply"><img src="' . $this->getSkinUrl('images/rule_component_apply.gif') . '" class="v-middle" alt="' . $this->__('Apply') . '" title="' . $this->__('Apply') . '" /></a> ';
         }
         $html .= '</span></span>&nbsp;';
     }
     return $html;
 }
开发者ID:par-orillonsoft,项目名称:magento_work,代码行数:23,代码来源:Editable.php

示例5: render

 /**
  * Render element
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @see Varien_Data_Form_Element_Renderer_Interface::render()
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $element->addClass('element-value-changer');
     $valueName = $element->getValueName();
     if ($valueName === '') {
         $valueName = '...';
     }
     $coreHelper = Mage::helper('Mage_Core_Helper_Data');
     $stringHelper = Mage::helper('Mage_Core_Helper_String');
     if ($element->getShowAsText()) {
         $html = ' <input type="hidden" class="hidden" id="' . $element->getHtmlId() . '" name="' . $element->getName() . '" value="' . $element->getValue() . '"/> ' . htmlspecialchars($valueName) . '&nbsp;';
     } else {
         $html = ' <span class="rule-param"' . ($element->getParamId() ? ' id="' . $element->getParamId() . '"' : '') . '>' . '<a href="javascript:void(0)" class="label">';
         $translate = Mage::getSingleton('Mage_Core_Model_Translate_Inline');
         $html .= $translate->isAllowed() ? $coreHelper->escapeHtml($valueName) : $coreHelper->escapeHtml($stringHelper->truncate($valueName, 33, '...'));
         $html .= '</a><span class="element"> ' . $element->getElementHtml();
         if ($element->getExplicitApply()) {
             $html .= ' <a href="javascript:void(0)" class="rule-param-apply"><img src="' . $this->getViewFileUrl('images/rule_component_apply.gif') . '" class="v-middle" alt="' . $this->__('Apply') . '" title="' . $this->__('Apply') . '" /></a> ';
         }
         $html .= '</span></span>&nbsp;';
     }
     return $html;
 }
开发者ID:natxetee,项目名称:magento2,代码行数:30,代码来源:Editable.php

示例6: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $valueName = $element->getValueName();
     if ($valueName == '') {
         $valueName = '...';
     } elseif (strlen($valueName) > 30) {
         $valueName = substr($valueName, 0, 30) . '...';
     }
     if ($element->getShowAsText()) {
         $html = ' <input type="hidden" id="' . $element->getHtmlId() . '" name="' . $element->getName() . '" value="' . $element->getValue() . '"/> ';
         $html .= htmlspecialchars($valueName) . '&nbsp;';
     } else {
         $html = ' <span class="rule-param" id="' . $element->getParamId() . '">';
         $html .= '<a href="javascript:void(0)" class="label">';
         $html .= htmlspecialchars($valueName);
         $html .= '</a><span class="element"> ';
         $html .= $element->getElementHtml();
         if ($element->getExplicitApply()) {
             $html .= ' <a href="javascript:void(0)" class="rule-param-apply"><img src="' . $this->getSkinUrl('images/rule_component_apply.gif') . '" class="v-middle" title="' . $this->__('Apply') . '"/></a> ';
         }
         $html .= '</span></span>&nbsp;';
     }
     return $html;
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:24,代码来源:Editable.php


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