本文整理匯總了PHP中Varien_Data_Form::setElementRenderer方法的典型用法代碼示例。如果您正苦於以下問題:PHP Varien_Data_Form::setElementRenderer方法的具體用法?PHP Varien_Data_Form::setElementRenderer怎麽用?PHP Varien_Data_Form::setElementRenderer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Varien_Data_Form
的用法示例。
在下文中一共展示了Varien_Data_Form::setElementRenderer方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getForm
/**
* Retrieve Varien Data Form
*
* @return Varien_Data_Form
*/
public function getForm()
{
if (!$this->_form) {
$this->_form = new Varien_Data_Form();
$this->_form->setElementRenderer(Mage::getBlockSingleton('mzax_emarketing/editable')->setFormat('form'));
$this->_form->setHtmlIdPrefix("emulate_");
$this->_form->setFieldNameSuffix("emulate");
}
return $this->_form;
}
示例2: _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('Mage_Adminhtml_Block_Widget_Form_Renderer_Element'));
Varien_Data_Form::setFieldsetRenderer($this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset'));
Varien_Data_Form::setFieldsetElementRenderer($this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element'));
return parent::_prepareLayout();
}
示例3: _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();
}
示例4: _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'));
}
示例5: _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();
}
示例6: _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();
}
示例7: _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;
}
示例8: _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;
}
示例9: _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;
}
示例10: 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);
}
}
示例11: getForm
/**
* Retrieve Varien Data Form
*
* @return Varien_Data_Form
*/
public function getForm()
{
$elementRenderer = Mage::getBlockSingleton('mzax_emarketing/editable');
$prefix = $this->getRoot()->getFormPrefix();
$form = new Varien_Data_Form();
$form->setHtmlIdPrefix("{$prefix}__{$this->getId()}__");
$form->setFieldNameSuffix("{$prefix}[{$this->getId()}]");
$form->setElementRenderer($elementRenderer);
return $form;
}
示例12: _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('productlabels/adminhtml_element_fieldsetcss'));
}
示例13: getForm
/**
* Retrieve Varien Data Form
*
* @return Varien_Data_Form
*/
public function getForm()
{
$elementRenderer = Mage::getBlockSingleton('mzax_emarketing/editable');
$elementRenderer->setFormat('form');
$form = new Varien_Data_Form();
$form->setElementRenderer($elementRenderer);
return $form;
}
示例14: _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);
}
示例15: _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'));
}