本文整理汇总了PHP中Mage_Adminhtml_Block_Widget_Form::_initFormValues方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Block_Widget_Form::_initFormValues方法的具体用法?PHP Mage_Adminhtml_Block_Widget_Form::_initFormValues怎么用?PHP Mage_Adminhtml_Block_Widget_Form::_initFormValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Adminhtml_Block_Widget_Form
的用法示例。
在下文中一共展示了Mage_Adminhtml_Block_Widget_Form::_initFormValues方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initFormValues
protected function _initFormValues()
{
$data = $this->getFilterData()->getData();
foreach ($data as $key => $value) {
if (is_array($value) && isset($value[0])) {
$data[$key] = explode(',', $value[0]);
}
}
$this->getForm()->addValues($data);
return parent::_initFormValues();
}
示例2: _initFormValues
/**
* Initialize form fileds values
* Method will be called after prepareForm and can be used for field values initialization
*
* @return Mage_Adminhtml_Block_Widget_Form
*/
protected function _initFormValues()
{
$data = $this->getFilterData()->getData();
foreach ($data as $key => $value) {
if (is_array($value) && isset($value[0])) {
$data[$key] = explode(',', $value[0]);
}
if ($key == 'product_category' and !empty($value)) {
$ctoptions = Mage::helper('productreports')->getProductCategories($value);
$this->setFieldOption('product_sub_category', $ctoptions);
}
}
$this->getForm()->addValues($data);
return parent::_initFormValues();
}
示例3: _initFormValues
/**
* Initialize form fileds values
*
* @return Mage_Eav_Block_Adminhtml_Attribute_Edit_Main_Abstract
*/
protected function _initFormValues()
{
Mage::dispatchEvent('adminhtml_block_eav_attribute_edit_form_init', array('form' => $this->getForm()));
$this->getForm()->addValues($this->getAttributeObject()->getData());
return parent::_initFormValues();
}
示例4: _initFormValues
/**
* Initialize form fileds values
*
* @return Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Main
*/
protected function _initFormValues()
{
$this->getForm()->addValues($this->getWidgetInstance()->getData());
return parent::_initFormValues();
}
示例5: _initFormValues
/**
* Initialize form fileds values
* Method will be called after prepareForm and can be used for field values initialization
*
* @return Mage_Adminhtml_Block_Widget_Form
*/
protected function _initFormValues()
{
$this->getForm()->addValues($this->getFilterData()->getData());
return parent::_initFormValues();
}
示例6: _initFormValues
protected function _initFormValues()
{
$this->getForm()->setValues($this->getForm()->getModel()->getData());
return parent::_initFormValues();
}