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


PHP Varien_Data_Form_Element_Abstract类代码示例

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


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

示例1: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $url_params = $this->getStoreId() ? array("store" => $this->getStoreId()) : array();
     $label_suffix = $this->getStoreId() ? " for This Store" : "";
     $this->addData(array("html_id" => $element->getHtmlId(), "button_label" => sprintf("Sync All Products%s", $label_suffix), "destination_url" => $this->getUrl("adminhtml/klevu_search/sync_all", $url_params)));
     return $this->_toHtml();
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:7,代码来源:Button.php

示例2: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     if (!Mage::helper('catalog/category_flat')->isBuilt()) {
         $element->setDisabled(true)->setValue(0);
     }
     return parent::_getElementHtml($element);
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:7,代码来源:Flatcatalog.php

示例3: _getElementHtml

 /**
  * Ajax Create the addressbooks.
  *
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $url = Mage::helper('adminhtml')->getUrl('*/connector/createnewaddressbook');
     $website = Mage::app()->getRequest()->getParam('website', 0);
     $element->setData('after_element_html', "<script>\n                function createAddressbook(form, element) {\n                    var name       = \$('connector_sync_settings_dynamic_addressbook_addressbook_name').value;\n                    var visibility = \$('connector_sync_settings_dynamic_addressbook_visibility').value;\n                    var reloadurl  = '{$url}';\n                    if(name && visibility){\n                        new Ajax.Request(reloadurl, {\n                            method: 'post',\n                            parameters: {'name' : name, 'visibility' : visibility, 'website': '{$website}'},\n                            onComplete: function(transport) {\n                                window.location.reload();\n                            }\n                        });\n                    }\n                    return false;\n                }\n            </script>");
     return parent::_getElementHtml($element);
 }
开发者ID:dotmailer,项目名称:dotmailer-magento-extension,代码行数:14,代码来源:Addressbook.php

示例4: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $el)
 {
     $data = $el->getOriginalData();
     if (isset($data['process'])) {
         $process = $data['process'];
     } else {
         return '<div>Action was not specified</div>';
     }
     if (isset($data['demo'])) {
         $demo = $data['demo'];
     } else {
         return '<div>Demo param was not specified</div>';
     }
     $buttonSuffix = '';
     if (isset($data['label'])) {
         $buttonSuffix = ' ' . $data['label'];
     }
     $url = $this->getUrl('adminhtml/porto_demo/' . $process) . 'demoversion/' . $demo;
     if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getWebsite())) {
         $url .= "/website/" . $code;
     }
     if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore())) {
         $url .= "/store/" . $code;
     }
     $html = $this->getLayout()->createBlock('adminhtml/widget_button')->setType('button')->setClass('import-cms')->setLabel('Import' . $buttonSuffix)->setOnClick("setLocation('{$url}')")->toHtml();
     return $html;
 }
开发者ID:ausger,项目名称:myporto,代码行数:27,代码来源:Demo.php

示例5: _getElementHtml

 /**
  * Render Default Product Price field as disabled if user does not have enough permissions
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     if (!Mage::helper('enterprise_pricepermissions')->getCanAdminEditProductPrice()) {
         $element->setReadonly(true, true);
     }
     return parent::_getElementHtml($element);
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:13,代码来源:Default.php

示例6: render

    public function render(Varien_Data_Form_Element_Abstract $element)
    {
        $useContainerId = $element->getData('use_container_id');
        return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5" class="ves-description">
					   <h3>	<a href="http://www.venustheme.com"><b>Magento - Venus Product Categories Block</b></a>  </h3>
								Show List Categories.<br>
							<br>
							
							<h4><b>Guide</b></h4>
							<ul>
								<li><a href="http://www.venustheme.com"> 1) Forum Support</a></li>
								<li><a href="http://www.venustheme.com"> 2) Submit A Request</a></li>
								<li><a href="http://www.venustheme.com"> 3) Submit A Ticket</a></li>
							</ul>
							<div>
								<h4>How to implement</h4>
								<ul>
									<li>&ltblock type="ves_productcategories/list" name="ves.list" /&gt</li>
									<li>{{block type="ves_productcategories/list" name="ves.list"}}</li>
								</ul>
								
							</div>
							<br>
							<div style="font-size:11px">@Copyright: <i><a href="http://www.venustheme.com" target="_blank">VenusTheme.Com</a></i></div>
					   </td></tr>', $element->getHtmlId(), $element->getHtmlId(), $element->getLabel());
    }
开发者ID:quanghuynt93,项目名称:VesSmartshop,代码行数:26,代码来源:Information.php

示例7: _getElementHtml

 /**
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $javaScript = "\n            <script type=\"text/javascript\">\n                Event.observe('{$element->getId()}', 'change', function(){\n                    split_payment=\$('{$element->getId()}').value;\n                    \$('{$this->_getSplitPaymentElementId($element)}').disabled = (!split_payment || split_payment!=1);\n                });\n            </script>";
     $element->setData('after_element_html', $javaScript . $element->getAfterElementHtml());
     $this->toggleDisabled($element);
     return parent::_getElementHtml($element);
 }
开发者ID:hipay,项目名称:hipay-fullservice-sdk-magento1,代码行数:12,代码来源:Allowsplitpayment.php

示例8: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $editor = new TM_Core_Block_Adminhtml_Widget_Form_Element_Wysiwyg($element->getData());
     $editor->setId($element->getId());
     $editor->setForm($element->getForm());
     return parent::render($editor);
 }
开发者ID:santhosh400,项目名称:ecart,代码行数:7,代码来源:Wysiwyg.php

示例9: _getElementHtml

 /**
  * Retrieve Element HTML
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     if (!$this->helper('Mage_Catalog_Helper_Product_Flat')->isBuilt()) {
         $element->setDisabled(true)->setValue(0);
     }
     return parent::_getElementHtml($element);
 }
开发者ID:,项目名称:,代码行数:13,代码来源:

示例10: prepareElementHtml

 public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $targetId = $this->getFieldsetId() . '_' . $this->getConfig('target');
     $block = $this->getLayout()->createBlock('mtwidget/adminhtml_widget_renderer_depend', '', array('target' => $targetId, 'url' => $this->getUrl('mtwidget/adminhtml_widget_attribute/option'), 'me' => $element->getHtmlId(), 'value' => implode(',', (array) $element->getValue())));
     $element->setData('after_element_html', $block->toHtml());
     return $element;
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:7,代码来源:Option.php

示例11: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     if ($country = $element->getForm()->getElement('country_id')) {
         $countryId = $country->getValue();
     } else {
         return $element->getDefaultHtml();
     }
     $regionId = $element->getForm()->getElement('region_id')->getValue();
     $html = '<tr>';
     $element->setClass('input-text');
     $html .= '<td class="label">' . $element->getLabelHtml() . '</td><td class="value">';
     $html .= $element->getElementHtml();
     $selectName = str_replace('region', 'region_id', $element->getName());
     $selectId = $element->getHtmlId() . '_id';
     $html .= '<select id="' . $selectId . '" name="' . $selectName . '" class="select required-entry" style="display:none">';
     $html .= '<option value="">' . AO::helper('customer')->__('Please select') . '</option>';
     $html .= '</select>';
     $html .= '<script type="text/javascript">
     if ($("' . $country->getHtmlId() . '") != undefined) {
         new regionUpdater("' . $country->getHtmlId() . '", "' . $element->getHtmlId() . '", "' . $selectId . '", ' . $this->helper('directory')->getRegionJson() . ');
     }
     </script>';
     $html .= '</td></tr>' . "\n";
     return $html;
 }
开发者ID:ronseigel,项目名称:agent-ohm,代码行数:25,代码来源:Customer_Edit_Renderer_Region.php

示例12: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     if (!Mage::helper('Mage_Catalog_Helper_Category_Flat')->isRebuilt()) {
         $element->setDisabled('disabled')->setValue(0);
     }
     return parent::_getElementHtml($element);
 }
开发者ID:natxetee,项目名称:magento2,代码行数:7,代码来源:Flatcatalog.php

示例13: prepareElementHtml

 public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $html = '<script type="text/javascript">' . 'function showHideColumn(){ if(jQuery("select[name=\'parameters[widget_type]\']").val() == \'block\' && jQuery("select[name=\'parameters[scroll]\']").val() == 0) jQuery("input[name=\'parameters[column]\']").closest( "tr").hide(); else jQuery("input[name=\'parameters[column]\']").closest( "tr").show();}</script>';
     $element->setOnchange('showHideColumn();');
     $element->setData('after_element_html', $html);
     return $element;
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:7,代码来源:Column.php

示例14: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $websites = Mage::helper('auspost')->getAllWebsites();
     if (!empty($websites)) {
         $website_id = $this->getRequest()->getParam('website');
         $website = Mage::getModel('core/website')->load($website_id, 'code');
         if ($website && in_array($website->getWebsiteId(), $websites)) {
             $html = $element->getElementHtml();
         } elseif (!$website_id) {
             $html = $element->getElementHtml();
         } else {
             $html = '<strong class="required">' . $this->__('Please buy additional domains') . '</strong>';
         }
     } else {
         $websitecode = Mage::app()->getRequest()->getParam('website');
         $websiteId = Mage::getModel('core/store')->load($websitecode)->getWebsiteId;
         $isenabled = Mage::app()->getWebsite($websiteId)->getConfig('auspost/activation/key');
         if ($isenabled != null || $isenabled != '') {
             $html = '<strong class="required">' . $this->__(' Please select a website') . '</strong>';
             $modulestatus = new Mage_Core_Model_Config();
             $modulestatus->saveConfig('carriers/auspost/active', 0);
         } else {
             $html = '<strong class="required">' . $this->__('Please enter a valid key') . '</strong>';
         }
     }
     return $html;
 }
开发者ID:bogdy2p,项目名称:apstufgnto,代码行数:27,代码来源:Enabledisable.php

示例15: 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


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