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


PHP Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract::_toHtml方法代码示例

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


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

示例1: _toHtml

 /**
  * Return the targetmap html
  *
  * @return string
  */
 protected function _toHtml()
 {
     // Make sure id is set before template is rendered or else we can't know the id.
     if (!$this->getHtmlId()) {
         $this->setHtmlId('_' . uniqid());
     }
     $html = parent::_toHtml();
     // Scripts in the template must be evaluated so that select values can be set.
     $html .= "\n            <script type='text/javascript'>\n            arrayRow{$this->getHtmlId()}._add = arrayRow{$this->getHtmlId()}.add;\n            arrayRow{$this->getHtmlId()}.add = function(templateData, insertAfterId) {\n              this._add(templateData, insertAfterId);\n              this.template.evaluate(templateData).evalScripts();\n            }\n            </script>\n        ";
     return $html;
 }
开发者ID:kirchbergerknorr,项目名称:firegento-logger,代码行数:16,代码来源:Targetmap.php

示例2: _toHtml

 public function _toHtml()
 {
     return '<input type="hidden" id="' . $this->getElement()->getHtmlId() . '"/>' . parent::_toHtml();
 }
开发者ID:dotmailer,项目名称:dotmailer-magento-extension,代码行数:4,代码来源:Customdatafields.php

示例3: _toHtml

 protected function _toHtml()
 {
     return '<div id="varnishcache_general_routes_ttl">' . parent::_toHtml() . '</div>';
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:4,代码来源:RouteTTL.php

示例4: _toHtml

 protected function _toHtml()
 {
     $html = parent::_toHtml();
     $html .= '<script type="text/javascript">$$(\'input[rel=disabled]\').each(function(el){ el.readOnly = true; });</script>';
     return $html;
 }
开发者ID:walexer,项目名称:magento-mongo,代码行数:6,代码来源:Values.php

示例5: _toHtml

 /**
  * Render block HTML
  *
  * @return string
  */
 protected function _toHtml()
 {
     $html = parent::_toHtml();
     $html .= Mage::helper('adminhtml/js')->getScript("\$\$('.select-installments').each(function(el){ el.value = el.readAttribute('data-value'); });\n");
     return $html;
 }
开发者ID:thiagormartins,项目名称:iugu-magento,代码行数:11,代码来源:Interest.php

示例6: _toHtml

 public function _toHtml()
 {
     $script = "<script type=\"text/javascript\">\n                document.observe('dom:loaded', function() {\n                    \$\$('tr#row_rule_condition tr td:first-child select').each(function(item) {\n                        doUpdateWithValues(item);\n                    });\n\n                    \$\$('tr#row_rule_condition tr td:first-child select').each(function(item) {\n                        Event.observe(item,'change', function(){\n                            doUpdate(item);\n                        });\n                    });\n\n                    \$\$('tr#row_rule_condition button.add').each(function(item) {\n                         Event.observe(item,'click', function(){\n                            \$\$('tr#row_rule_condition tr td:first-child select').each(function(item) {\n                                 Event.observe(item,'change', function(){\n                                    doUpdate(item);\n                                });\n                            });\n                            \$\$('tr#row_rule_condition tr td select').each(function(item) {\n                                Event.observe(item,'change', function(){\n                                     if(item.readAttribute('title') == 'conditions'){\n                                        doUpdateForCondition(item);\n                                     }\n                                });\n                            });\n                        });\n                    });\n\n                    function doUpdate(item){\n                        var url = '" . Mage::helper('adminhtml')->getUrl('adminhtml/rules/ajax') . "';\n                        var cond = item.up(1).down().next();\n                        var condName = cond.down().readAttribute('name');\n                        var value = item.up(1).down().next(1);\n                        var valueName = value.down().readAttribute('name');\n                        var attribute = item.value;\n                        new Ajax.Request(url, {\n                            method: 'post',\n                            parameters: {\n                                attribute: attribute,\n                                condition: condName,\n                                value: valueName\n                            },\n                            onSuccess: function(transport){\n                                var json = transport.responseJSON;\n                                cond.update(json.condition);\n                                value.update(json.cvalue);\n\n                                \$\$('tr#row_rule_condition tr td select').each(function(item) {\n                                    Event.observe(item,'change', function(){\n                                         if(item.readAttribute('title') == 'conditions'){\n                                            doUpdateForCondition(item);\n                                         }\n                                    });\n                                });\n                            }\n                        });\n                    }\n\n                    function doUpdateWithValues(item){\n                        var url = '" . Mage::helper('adminhtml')->getUrl('adminhtml/rules/selected') . "';\n                        var arrayKey = item.up(1).readAttribute('id');\n                        var cond = item.up(1).down().next();\n                        var condName = cond.down().readAttribute('name');\n                        var value = item.up(1).down().next(1);\n                        var valueName = value.down().readAttribute('name');\n                        var attribute = item.value;\n                        var ruleId = \$('rule_id').value;\n                        new Ajax.Request(url, {\n                            method: 'post',\n                            parameters: {\n                                attribute: attribute,\n                                condition: condName,\n                                value: valueName,\n                                arraykey: arrayKey,\n                                ruleid: ruleId\n                            },\n                            onSuccess: function(transport){\n                                var json = transport.responseJSON;\n                                cond.update(json.condition);\n                                value.update(json.cvalue);\n\n                                \$\$('tr#row_rule_condition tr td select').each(function(item) {\n                                    Event.observe(item,'change', function(){\n                                         if(item.readAttribute('title') == 'conditions'){\n                                            doUpdateForCondition(item);\n                                         }\n                                    });\n                                });\n                            }\n                        });\n                    }\n\n                    function doUpdateForCondition(item){\n                        var url = '" . Mage::helper('adminhtml')->getUrl('adminhtml/rules/value') . "';\n                        var attribute = item.up(1).down();\n                        var attributeValue = attribute.down().value;\n                        var value = item.up().next();\n                        var valueName = value.down().readAttribute('name');\n                        var condValue = item.value;\n                        new Ajax.Request(url, {\n                            method: 'post',\n                            parameters: {\n                                attributeValue: attributeValue,\n                                value: valueName,\n                                condValue: condValue\n                            },\n                            onSuccess: function(transport){\n                                var json = transport.responseJSON;\n                                value.update(json.cvalue);\n                            }\n                        });\n                    }\n                });\n            </script>";
     return '<input type="hidden" id="' . $this->getElement()->getHtmlId() . '"/>' . parent::_toHtml() . $script;
 }
开发者ID:dotmailer,项目名称:dotmailer-magento-extension,代码行数:5,代码来源:Customdatafields.php

示例7: _toHtml

 public function _toHtml()
 {
     if (count($this->getElement()->getValues())) {
         return '<input type="hidden" id="' . $this->getElement()->getHtmlId() . '"/>' . parent::_toHtml();
     } else {
         return "<p class='notice'>" . Mage::helper('adminhtml')->__("There are no email templates to map.") . "</p>";
     }
 }
开发者ID:vdimitrovv,项目名称:dotmailer-magento-extension,代码行数:8,代码来源:Templatefields.php

示例8: _toHtml

 /**
  * Render block HTML
  *
  * @return string
  * @throws Exception
  */
 protected function _toHtml()
 {
     if (!$this->_isPreparedToRender) {
         $this->_prepareToRender();
         $this->_isPreparedToRender = true;
     }
     if (empty($this->_columns)) {
         throw new Exception('At least one column must be defined.');
     }
     return parent::_toHtml();
 }
开发者ID:Newsman,项目名称:Magento-Newsman,代码行数:17,代码来源:Segments.php


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