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


PHP Mage_Adminhtml_Block_System_Config_Form_Field::render方法代码示例

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


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

示例1: render

 /**
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     if (!extension_loaded('soap') || !extension_loaded('openssl') || !Mage::helper('bronto_common')->getApiToken()) {
         return null;
     }
     return parent::render($element);
 }
开发者ID:bevello,项目名称:bevello,代码行数:12,代码来源:Hidden.php

示例2: render

 /**
  * Enter description here...
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $fieldConfig = $element->getFieldConfig();
     $clonePath = (string) $fieldConfig->clone_path;
     $clonePaths = explode('/', $clonePath);
     // Prepare value for cloned element
     $name = 'groups[' . $clonePaths[1] . '][fields][' . $clonePaths[2] . '][value]';
     if (isset($this->_affiliateConfigData[$clonePath])) {
         $data = $this->_affiliateConfigData[$clonePath];
         $inherit = false;
     } else {
         $data = $this->_affiliateConfigRoot->descend($clonePath);
         $inherit = true;
     }
     if ($fieldConfig->backend_model) {
         $model = Mage::getModel((string) $fieldConfig->backend_model);
         if (!$model instanceof Mage_Core_Model_Config_Data) {
             Mage::throwException('Invalid config field backend model: ' . (string) $fieldConfig->backend_model);
         }
         $model->setPath($clonePath)->setValue($data)->afterLoad();
         $data = $model->getValue();
     }
     $element->setName($name)->setValue($data)->setInherit($inherit);
     // Render Element to HTML
     $html = parent::render($element);
     // Prepare Javascript for cloned element
     $cloneId = $element->getHtmlId();
     $origId = implode('_', $clonePaths);
     $html .= "<script type='text/javascript'>\r\nEvent.observe(window, 'load', function() {\r\n    \$('{$cloneId}').observe('change', function(){\r\n        Form.Element.setValue(\$('{$origId}'), Form.Element.getValue(\$('{$cloneId}')));\r\n    });\r\n    \$('{$origId}').observe('change', function(){\r\n        Form.Element.setValue(\$('{$cloneId}'), Form.Element.getValue(\$('{$origId}')));\r\n    });";
     if ($element->getCanUseWebsiteValue() || $element->getCanUseDefaultValue()) {
         $html .= "\r\n    \$('{$cloneId}_inherit').observe('click', function(){\r\n        var el = \$('{$origId}_inherit');\r\n        el.checked = \$('{$cloneId}_inherit').checked;\r\n        toggleValueElements(el, Element.previous(el.parentNode));\r\n    });\r\n    \$('{$origId}_inherit').observe('click', function(){\r\n        var el = \$('{$cloneId}_inherit');\r\n        el.checked = \$('{$origId}_inherit').checked;\r\n        toggleValueElements(el, Element.previous(el.parentNode));\r\n    });";
     }
     $html .= "\r\n});\r\n</script>";
     return $html;
 }
开发者ID:billadams,项目名称:forever-frame,代码行数:41,代码来源:Clone.php

示例3: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $element->setFormat(Varien_Date::DATE_INTERNAL_FORMAT);
     //or other format
     $element->setImage($this->getSkinUrl('images/grid-cal.gif'));
     return parent::render($element);
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:7,代码来源:Date.php

示例4: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $element->unsetData('scope');
     $element->unsetData('can_use_website_value');
     $element->unsetData('can_use_default_value');
     return parent::render($element);
 }
开发者ID:kalenjordan,项目名称:magento-twigmail,代码行数:7,代码来源:SendTest.php

示例5: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $this->setData('scope', $element->getScope());
     // Remove the inheritance checkbox
     $element->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
     return parent::render($element);
 }
开发者ID:mSupply,项目名称:runnable_test_repo,代码行数:7,代码来源:Label.php

示例6: render

 /**
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $realpath = str_replace('-', '/', str_replace('bronto_email_templates_', '', $element->getId()));
     $realValue = Mage::helper('bronto_email')->getAdminScopedConfig($realpath);
     $element->setValue($realValue);
     $element->setPath($realpath);
     return parent::render($element);
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:13,代码来源:Field.php

示例7: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $helper = Mage::helper('netzarbeiter_groupscatalog2');
     if (!$helper->getConfig('show_multiselect_field')) {
         $element->setComment($this->__('This field is read-only.<br/>(change the "Show multiselect customer group fields" option further down to enable this field)'));
     }
     return parent::render($element);
 }
开发者ID:gewaechshaus,项目名称:groupscatalog2,代码行数:8,代码来源:Customergroup.php

示例8: render

 /**
  * Enter description here...
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $countryCode = Mage::helper('paypal')->getConfigurationCountryCode();
     if ($countryCode == 'DE') {
         return Mage::getBlockSingleton('paypal/adminhtml_System_config_field_hidden')->render($element);
     }
     return parent::render($element);
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:14,代码来源:SolutionType.php

示例9: render

 /**
  * Override method to render element only if module enabled
  *
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return String
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     // If Reward Points Module is installed
     if (!Mage::helper('bronto_common')->isModuleInstalled('Enterprise_CustomerBalance')) {
         return '';
     }
     return parent::render($element);
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:15,代码来源:Storecredit.php

示例10: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     if (!Mage::getSingleton('googletrustedstore/googleShoppingAdapter')->isActive()) {
         return parent::render($element);
     } else {
         return '';
     }
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:8,代码来源:GoogleShoppingAccountId.php

示例11: render

 /**
  * 
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $__html = '';
     if (!Mage::app()->isSingleStoreMode()) {
         $__html = parent::render($element);
     }
     return $__html;
 }
开发者ID:ashfaqphplhr,项目名称:artificiallawnsforturf,代码行数:11,代码来源:AdminhtmlSystemConfigFieldStorefilter.php

示例12: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     if ($element->getScope() == "stores") {
         $this->setStoreId($element->getScopeId());
     }
     // Remove the scope information so it doesn't get printed out
     $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
     return parent::render($element);
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:9,代码来源:Button.php

示例13: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     if ($this->getRequest()->getParam('website') != '') {
         if (Mage::app()->getStore()->getConfig('general/price/scope') == Mage_Core_Model_Store::PRICE_SCOPE_GLOBAL) {
             return '';
         }
     }
     return parent::render($element);
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:9,代码来源:Base.php

示例14: render

 /**
  * @param Varien_Data_Form_Element_Abstract $_element
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $_element)
 {
     $_html = parent::render($_element);
     $_html .= '<tr style="display: none;"><td>';
     $_script = "<script type=\"text/javascript\">new MaskedInput('#" . $_element->getHtmlId() . "', '99:99')</script>";
     $_html .= $_script;
     $_html .= '</td></tr>';
     return $_html;
 }
开发者ID:hueyl77,项目名称:fourwindsgear,代码行数:13,代码来源:StoreTime.php

示例15: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     if ($this->getRequest()->getParam('website') != '') {
         $priceScope = AO::app()->getStore()->getConfig(Mage_Core_Model_Store::XML_PATH_PRICE_SCOPE);
         if ($priceScope == Mage_Core_Model_Store::PRICE_SCOPE_GLOBAL) {
             return '';
         }
     }
     return parent::render($element);
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:10,代码来源:Adminhtml_Frontend_Currency_Base.php


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