本文整理匯總了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;
}