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


PHP Varien_Data_Form_Element_Abstract::getSortedElements方法代码示例

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


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

示例1: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $output = '';
     foreach ($element->getSortedElements() as $field) {
         $id = $field->getHtmlId();
         $output .= '<div class="creativestyle-info" id="container_' . $id . '"' . (!$field->getValue() ? ' style="display:none;"' : '') . '>';
         $output .= '<div style="float:right;"><input id="amazon_show_signup_info" type="checkbox" class="checkbox" value="1" name="amazon_show_signup_info"' . (!$field->getValue() ? ' checked="checked"' : '') . '/> <label for="amazon_show_signup_info" style="font-size: 11px; color: #666666;">' . $this->__('Do not show again') . '</label></div>';
         $output .= '<p><strong>' . $this->__('Please note!') . '</strong> ';
         $output .= $this->__('If you do not have a Checkout by Amazon account yet please sign up.');
         $output .= '</p><ul>';
         $output .= '<li>DE: <a target="_blank" href="https://payments.amazon.de/business/?ld=INDECBAmagentoplugin">https://payments.amazon.de/business/</a></li>';
         $output .= '<li>UK: <a target="_blank" href="https://payments.amazon.co.uk/business/?ld=INUKCBAMagentoplugin">https://payments.amazon.co.uk/business/</a></li>';
         $output .= '</ul>';
         $output .= '<input type="hidden" id="' . $field->getHtmlId() . '" name="' . $field->getName() . '" value="' . $field->getEscapedValue() . '"/>';
         $output .= '<script type="text/javascript">//<![CDATA[' . "\n";
         $output .= '    Event.observe(\'amazon_show_signup_info\', \'click\', function() {' . "\n";
         $output .= '        if ($(\'amazon_show_signup_info\').checked) {' . "\n";
         $output .= '            if (confirm(\'' . $this->__('Are you sure?') . '\')) {' . "\n";
         $output .= '                $(\'container_' . $id . '\').hide();' . "\n";
         $output .= '                $(\'' . $field->getHtmlId() . '\').value = 0;' . "\n";
         $output .= '            } else {' . "\n";
         $output .= '                $(\'amazon_show_signup_info\').checked = false;' . "\n";
         $output .= '            };' . "\n";
         $output .= '        } else {' . "\n";
         $output .= '            $(\'container_' . $id . '\').show();' . "\n";
         $output .= '            $(\'' . $field->getHtmlId() . '\').value = 1;' . "\n";
         $output .= '        };' . "\n";
         $output .= '    });' . "\n";
         $output .= '//]]></script>' . "\n";
         $output .= '</div>';
         break;
     }
     return $output;
 }
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:34,代码来源:Signup.php

示例2: render

 /**
  * Render fieldset html
  *
  * @param Varien_Data_Form_Element_Abstract $fieldset
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $fieldset)
 {
     foreach ($fieldset->getSortedElements() as $element) {
         $htmlId = $element->getHtmlId();
         $this->_elements[$htmlId] = $element;
     }
     $originalData = $fieldset->getOriginalData();
     $this->addData(array('fieldset_label' => $fieldset->getLegend(), 'fieldset_help_url' => isset($originalData['help_url']) ? $originalData['help_url'] : ''));
     return $this->toHtml();
 }
开发者ID:ravi2jdesign,项目名称:solvingmagento_1.7.0,代码行数:16,代码来源:Global.php

示例3: render

 /**
  * Render fieldset html
  *
  * @param Varien_Data_Form_Element_Abstract $fieldset
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $fieldset)
 {
     foreach ($fieldset->getSortedElements() as $element) {
         $htmlId = $element->getHtmlId();
         $this->_elements[$htmlId] = $element;
     }
     $originalData = $fieldset->getOriginalData();
     $this->addData(array('fieldset_label' => $fieldset->getLegend(), 'fieldset_admin_label' => isset($originalData['admin_label']) ? $originalData['admin_label'] : '', 'fieldset_backend_url' => Mage::getModel('intraship/config')->getBackendUrl(), 'fieldset_help_url' => isset($originalData['help_url']) ? $originalData['help_url'] : '', 'fieldset_doc_url' => isset($originalData['doc_url']) ? $originalData['doc_url'] : '', 'fieldset_onlineretoure_doc_url' => isset($originalData['onlineretoure_doc_url']) ? $originalData['onlineretoure_doc_url'] : '', 'fieldset_partner_url' => isset($originalData['partner_url']) ? $originalData['partner_url'] : ''));
     return $this->toHtml();
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:16,代码来源:Notice.php

示例4: _getFooterHtml

 /**
  * Return footer html for fieldset
  * Add extra tooltip comments to elements
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 protected function _getFooterHtml($element)
 {
     $tooltipsExist = false;
     $html = '</tbody></table>';
     foreach ($element->getSortedElements() as $field) {
         if ($field->getTooltip()) {
             $tooltipsExist = true;
             $html .= sprintf('<div id="row_%s_comment" class="system-tooltip-box" style="display:none;">%s</div>', $field->getId(), $field->getTooltip());
         }
     }
     $html .= '</fieldset>' . $this->_getExtraJs($element, $tooltipsExist);
     return $html;
 }
开发者ID:par-orillonsoft,项目名称:magento_work,代码行数:20,代码来源:Fieldset.php

示例5: _getUsedAttributeCodes

 /**
  * @param Varien_Data_Form_Element_Abstract $fieldset
  *
  * @return array
  */
 protected function _getUsedAttributeCodes(Varien_Data_Form_Element_Abstract $fieldset)
 {
     $usedAttributeCodes = array();
     foreach ($fieldset->getSortedElements() as $_element) {
         // Determine the *actual* name for this select box
         preg_match('/\\[(\\w+)\\]\\[value\\]/', $_element->getName(), $matches);
         if (isset($matches[1])) {
             // Add to list
             $usedAttributeCodes[] = $matches[1];
         }
     }
     // Merge in ignored attribute codes
     $usedAttributeCodes = array_merge($usedAttributeCodes, $this->_ignoreAttributes);
     return $usedAttributeCodes;
 }
开发者ID:bevello,项目名称:bevello,代码行数:20,代码来源:Attributes.php


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