本文整理汇总了PHP中Varien_Data_Form::getFieldsetElementRenderer方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Form::getFieldsetElementRenderer方法的具体用法?PHP Varien_Data_Form::getFieldsetElementRenderer怎么用?PHP Varien_Data_Form::getFieldsetElementRenderer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Data_Form
的用法示例。
在下文中一共展示了Varien_Data_Form::getFieldsetElementRenderer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _beforeToHtml
protected function _beforeToHtml()
{
parent::_beforeToHtml();
if (!Mage::registry('url_store')) {
$this->_unregUrlStore = true;
Mage::register('url_store', Mage::app()->getStore());
}
$this->_oldStoreId = Mage::app()->getStore()->getId();
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$this->_oldFieldsetRenderer = Varien_Data_Form::getFieldsetRenderer();
$this->_oldFieldsetElementRenderer = Varien_Data_Form::getFieldsetElementRenderer();
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('udprod/vendor_product_renderer_fieldset'));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('udprod/vendor_product_renderer_fieldsetElement'));
return $this;
}
示例2: _prepareForm
/**
* Prepare settings form
*
* @return Mage_Adminhtml_Block_Widget_Form
*/
protected function _prepareForm()
{
/** @var $settings Itoris_LayeredNavigation_Model_Settings */
$settings = Mage::getModel('itoris_layerednavigation/settings');
$settings->load($this->getDataHelper()->getWebsiteIdFromRequest(), $this->getDataHelper()->getStoreIdFromRequest());
$scope = $this->getDataHelper()->getScope($this->getRequest());
Varien_Data_Form::getFieldsetElementRenderer()->setTemplate('itoris/layerednavigation/settings/element.phtml');
$form = new Varien_Data_Form();
$fieldSet = $form->addFieldset('base_fieldset', array('legend' => $this->__('Settings')));
$fieldSet->addField('enabled', 'select', array('name' => 'settings[enabled][value]', 'label' => $this->__('Extension Enabled'), 'data_type' => 'int', 'values' => array(array('value' => 1, 'label' => $this->__('Yes')), array('value' => 0, 'label' => $this->__('No'))), 'use_parent_value' => $settings->isParentValue('enabled', $scope)));
$fieldSet->addField('multicategory_enabled', 'select', array('name' => 'settings[multicategory_enabled][value]', 'label' => $this->__('Multi-category mode'), 'data_type' => 'int', 'values' => array(array('value' => 1, 'label' => $this->__('Yes')), array('value' => 0, 'label' => $this->__('No'))), 'use_parent_value' => $settings->isParentValue('multicategory_enabled', $scope)));
$fieldSet->addField('graphical_price_enabled', 'select', array('name' => 'settings[graphical_price_enabled][value]', 'label' => $this->__('Graphical price range'), 'data_type' => 'int', 'values' => array(array('value' => 1, 'label' => $this->__('Yes')), array('value' => 0, 'label' => $this->__('No'))), 'use_parent_value' => $settings->isParentValue('graphical_price_enabled', $scope)));
$form->setValues($settings->getSettings());
$form->setAction($this->getUrl('*/*/save', array('website' => $this->getRequest()->getParam('website'), 'store' => $this->getRequest()->getParam('store'))));
$form->setMethod('post');
$form->setUseContainer(true);
$form->setId('edit_form');
$this->setForm($form);
return parent::_prepareForm();
}
示例3: addField
/**
* Enter description here...
*
* @param string $elementId
* @param string $type
* @param array $config
* @param boolean $after
* @return Varien_Data_Form_Element_Abstract
*/
public function addField($elementId, $type, $config, $after = false)
{
$element = parent::addField($elementId, $type, $config, $after);
if ($renderer = Varien_Data_Form::getFieldsetElementRenderer()) {
$element->setRenderer($renderer);
}
return $element;
}