本文整理汇总了PHP中Varien_Data_Form::setFieldsetRenderer方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Form::setFieldsetRenderer方法的具体用法?PHP Varien_Data_Form::setFieldsetRenderer怎么用?PHP Varien_Data_Form::setFieldsetRenderer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Data_Form
的用法示例。
在下文中一共展示了Varien_Data_Form::setFieldsetRenderer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _prepareLayout
/**
* Preparing global layout
*
* You can redefine this method in child classes for changin layout
*
* @return Mage_Core_Block_Abstract
*/
protected function _prepareLayout()
{
Varien_Data_Form::setElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_element'));
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset'));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset_element'));
return parent::_prepareLayout();
}
示例2: _prepareLayout
/**
* Preparing global layout
*
* You can redefine this method in child classes for changin layout
*
* @return Ced_CsMarketplace_Block_Vendor_Abstract
*/
protected function _prepareLayout()
{
Varien_Data_Form::setElementRenderer($this->getLayout()->createBlock('csmarketplace/widget_form_renderer_element'));
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('csmarketplace/widget_form_renderer_fieldset'));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('csmarketplace/vpayments_view_element'));
return parent::_prepareLayout();
}
示例3: _prepareLayout
/**
* Preparing global layout
*
* You can redefine this method in child classes for changing layout
*
* @return Mage_Core_Block_Abstract
*/
protected function _prepareLayout()
{
Varien_Data_Form::setElementRenderer($this->getLayout()->createBlock('Mage_Backend_Block_Widget_Form_Renderer_Element', $this->getNameInLayout() . '_element'));
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('Mage_Backend_Block_Widget_Form_Renderer_Fieldset', $this->getNameInLayout() . '_fieldset'));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('Mage_Backend_Block_Widget_Form_Renderer_Fieldset_Element', $this->getNameInLayout() . '_fieldset_element'));
return parent::_prepareLayout();
}
示例4: _prepareLayout
/**
* Preparing global layout
*
* You can redefine this method in child classes for changin layout
*
* @return Mage_Core_Block_Abstract
*/
protected function _prepareLayout()
{
Varien_Data_Form::setElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_element'));
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('enterprise_rma/adminhtml_rma_edit_item_renderer_fieldset'));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset_element'));
return $this;
}
示例5: _prepareLayout
/**
* Block Layout Preparation
*/
protected function _prepareLayout()
{
$regionData = Mage::getModel('directory/region_api')->items($this->getRequest()->getParam('id'));
Varien_Data_Form::setElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_element'));
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('pixcountries/adminhtml_pixcountries_edit_renderer_fieldset')->setRegionData($regionData));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset_element'));
}
示例6: _toHtml
protected function _toHtml()
{
$_form = new Varien_Data_Form();
$_form->setElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_element'));
$_form->setFieldsetRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset'));
$_form->setFieldsetElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset_element'));
$_fieldset = $_form->addFieldset('types_data_fset', array('legend' => $this->__('Representation settings')));
$_fieldset->setFieldsetContainerId('awf_types_settings');
$type = Mage::getSingleton('awfeatured/representations_config')->getRepresentation($this->getData('type'));
foreach ($type->getOptions() as $key => $options) {
$_field = $_fieldset->addField($key, $options['input_type'], array('label' => $this->__($options['label']), 'name' => 'type_data[' . $key . ']'));
if ($_field) {
if (isset($options['default'])) {
$_field->setValue($options['default']);
}
if ($options['input_type'] == 'select' && isset($options['source_model'])) {
$_field->setValues(Mage::getModel($options['source_model'])->toOptionArray());
}
if (isset($options['required'])) {
$_field->setRequired($options['required']);
}
}
}
if ($this->getData('is_init')) {
$_data = Mage::getSingleton('adminhtml/session')->getData(AW_Featured_Helper_Data::FORM_DATA_KEY);
$_data = isset($_data['type_data']) ? $_data['type_data'] : null;
if ($_data) {
$_form->setValues($_data);
}
}
return $_form->getHtml();
}
示例7: _prepareLayout
protected function _prepareLayout()
{
parent::_prepareLayout();
Varien_Data_Form::setElementRenderer($this->getLayout()->createBlock($this->rendererPrefix . '_element'));
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock($this->rendererPrefix . '_fieldset'));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock($this->rendererPrefix . '_fieldset_element'));
return $this;
}
示例8: _prepareLayout
protected function _prepareLayout()
{
$return = parent::_prepareLayout();
$inGrid = $this->getEditedInGrid();
$required = $this->getIsRequiredValueEdit();
Varien_Data_Form::setElementRenderer($this->getLayout()->createBlock('customgrid/widget_grid_form_renderer_element')->setEditedInGrid($inGrid)->setIsRequiredValueEdit($required));
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('customgrid/widget_grid_form_renderer_fieldset')->setEditedInGrid($inGrid)->setIsRequiredValueEdit($required));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('customgrid/widget_grid_form_renderer_fieldset_element')->setEditedInGrid($inGrid)->setIsRequiredValueEdit($required));
return $return;
}
示例9: _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;
}
示例10: _prepareForm
/**
* Instantiate form and fields
*
* @return Varien_Data_Form
*/
protected function _prepareForm()
{
$form = new Varien_Data_Form();
$form->setFieldsetRenderer($this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset'));
$form->setFieldsetElementRenderer($this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element'));
/**
* if there is a parent element defined, it will be replaced by a hidden element with the same name
* and overriden by the form elements
* It is needed to maintain HTML consistency of the parent element's form
*/
if ($this->_parentElement) {
$form->setHtmlIdPrefix($this->_parentElement->getHtmlId())->setFieldNameSuffix($this->_parentElement->getName());
$form->addField('', 'hidden', array('name' => ''));
}
$noYes = array(Mage::helper('Mage_Adminhtml_Helper_Data')->__('No'), Mage::helper('Mage_Adminhtml_Helper_Data')->__('Yes'));
// schedule
$schedule = $form->addFieldset('schedule_fieldset', array('legend' => Mage::helper('Mage_Sales_Helper_Data')->__('Schedule'), 'disabled' => $this->_isReadOnly));
$schedule->addField('start_date_is_editable', 'select', array('name' => 'start_date_is_editable', 'label' => Mage::helper('Mage_Sales_Helper_Data')->__('Customer Can Define Start Date'), 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Whether buyer can define the date when billing for the profile begins.'), 'options' => $noYes, 'disabled' => $this->_isReadOnly));
$this->_addField($schedule, 'schedule_description');
$this->_addField($schedule, 'suspension_threshold');
$this->_addField($schedule, 'bill_failed_later', array('options' => $noYes), 'select');
// billing
$billing = $form->addFieldset('billing_fieldset', array('legend' => Mage::helper('Mage_Sales_Helper_Data')->__('Billing'), 'disabled' => $this->_isReadOnly));
$this->_addField($billing, 'period_unit', array('options' => $this->_getPeriodUnitOptions(Mage::helper('Mage_Adminhtml_Helper_Data')->__('-- Please Select --'))), 'select');
$this->_addField($billing, 'period_frequency');
$this->_addField($billing, 'period_max_cycles');
// trial
$trial = $form->addFieldset('trial_fieldset', array('legend' => Mage::helper('Mage_Sales_Helper_Data')->__('Trial Period'), 'disabled' => $this->_isReadOnly));
$this->_addField($trial, 'trial_period_unit', array('options' => $this->_getPeriodUnitOptions(Mage::helper('Mage_Adminhtml_Helper_Data')->__('-- Not Selected --'))), 'select');
$this->_addField($trial, 'trial_period_frequency');
$this->_addField($trial, 'trial_period_max_cycles');
$this->_addField($trial, 'trial_billing_amount');
// initial fees
$initial = $form->addFieldset('initial_fieldset', array('legend' => Mage::helper('Mage_Sales_Helper_Data')->__('Initial Fees'), 'disabled' => $this->_isReadOnly));
$this->_addField($initial, 'init_amount');
$this->_addField($initial, 'init_may_fail', array('options' => $noYes), 'select');
return $form;
}
示例11: resetApp
/**
* Reset application global state
*/
public function resetApp()
{
/** @var $objectManager Magento_Test_ObjectManager */
$objectManager = Mage::getObjectManager();
$objectManager->clearCache();
$resource = Mage::registry('_singleton/Mage_Core_Model_Resource');
Mage::reset();
Varien_Data_Form::setElementRenderer(null);
Varien_Data_Form::setFieldsetRenderer(null);
Varien_Data_Form::setFieldsetElementRenderer(null);
if ($resource) {
Mage::register('_singleton/Mage_Core_Model_Resource', $resource);
}
}
示例12: _beforeToHtml
protected function _beforeToHtml()
{
parent::_beforeToHtml();
$hlp = Mage::helper('udropship');
$sHlp = Mage::helper('udmspro');
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('udmspro/vendor_register_renderer_fieldset'));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('udmspro/vendor_register_renderer_fieldsetElement'));
$form = new Varien_Data_Form();
$this->setForm($form);
$fsIdx = 0;
$columnsConfig = Mage::getStoreConfig('udsignup/form/fieldsets');
if (!is_array($columnsConfig)) {
$columnsConfig = Mage::helper('udropship')->unserialize($columnsConfig);
if (is_array($columnsConfig)) {
foreach ($columnsConfig as $fsConfig) {
if (is_array($fsConfig)) {
$requiredFields = (array) @$fsConfig['required_fields'];
$fieldsExtra = (array) @$fsConfig['fields_extra'];
$fields = array();
foreach (array('top_columns', 'bottom_columns', 'left_columns', 'right_columns') as $colKey) {
if (isset($fsConfig[$colKey]) && is_array($fsConfig[$colKey])) {
foreach ($fsConfig[$colKey] as $fieldCode) {
$field = Mage::helper('udmspro/protected')->getRegistrationField($fieldCode);
if (!empty($field)) {
switch ($colKey) {
case 'top_columns':
$field['is_top'] = true;
break;
case 'bottom_columns':
$field['is_bottom'] = true;
break;
case 'right_columns':
$field['is_right'] = true;
break;
default:
$field['is_left'] = true;
break;
}
if (in_array($fieldCode, $requiredFields)) {
$field['required'] = true;
} else {
$field['required'] = false;
if (!empty($field['class'])) {
$field['class'] = str_replace('required-entry', '', $field['class']);
}
}
if (!empty($fieldsExtra[$fieldCode]['use_custom_label']) && !empty($fieldsExtra[$fieldCode]['custom_label'])) {
$field['label'] = $fieldsExtra[$fieldCode]['custom_label'];
}
if (!empty($fieldsExtra[$fieldCode]['has_url'])) {
$field['label'] = str_replace('{{url}}', @$fieldsExtra[$fieldCode]['url'], $field['label']);
}
$fields[$fieldCode] = $field;
}
}
}
}
if (!empty($fields)) {
$fsIdx++;
$fieldset = $form->addFieldset('group_fields' . $fsIdx, array('legend' => $fsConfig['title'], 'class' => 'fieldset-wide'));
$this->_addElementTypes($fieldset);
foreach ($fields as $field) {
if (!empty($field['input_renderer'])) {
$fieldset->addType($field['type'], $field['input_renderer']);
}
$formField = $fieldset->addField($field['id'], $field['type'], $field);
if (!empty($field['renderer'])) {
$formField->setRenderer($field['renderer']);
}
$formField->addClass('input-text');
if (!empty($field['required'])) {
$formField->addClass('required-entry');
}
}
$this->_prepareFieldsetColumns($fieldset);
$emptyForm = false;
}
}
}
}
}
$_data = Mage::getSingleton('udropship/session')->getRegistrationFormData(true);
if ($_data) {
$form->setValues($_data);
}
return $this;
}
示例13: _resetApp
/**
* Reset application global state
*/
protected function _resetApp()
{
/** @var $layout Mage_Core_Model_Layout */
$layout = Mage::registry('_singleton/Mage_Core_Model_Layout');
if ($layout) {
/* Force to cleanup circular references */
$layout->__destruct();
}
Mage::reset();
Varien_Data_Form::setElementRenderer(null);
Varien_Data_Form::setFieldsetRenderer(null);
Varien_Data_Form::setFieldsetElementRenderer(null);
}
示例14: _prepareLayout
protected function _prepareLayout()
{
Varien_Data_Form::setElementRenderer($this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Form_Renderer_Element', $this->getNameInLayout() . '_element'));
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset', $this->getNameInLayout() . '_fieldset'));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element', $this->getNameInLayout() . '_fieldset_element'));
}
示例15: _prepareLayout
protected function _prepareLayout()
{
Varien_Data_Form::setElementRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_element'));
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset'));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('marketplace/adminhtml_catalog_form_renderer_fieldset_element'));
}