本文整理汇总了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);
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例10: render
public function render(Varien_Data_Form_Element_Abstract $element)
{
if (!Mage::getSingleton('googletrustedstore/googleShoppingAdapter')->isActive()) {
return parent::render($element);
} else {
return '';
}
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}