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