Example #1
0
 /**
  * Initialize form fields values
  * Method will be called after prepareForm and can be used for field values initialization
  *
  * @return \Magento\Backend\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]);
         }
     }
     $this->getForm()->addValues($data);
     return parent::_initFormValues();
 }
Example #2
0
 /**
  * Initialize form fileds values
  *
  * @return $this
  */
 protected function _initFormValues()
 {
     $this->getForm()->addValues($this->getAttributeObject()->getData());
     return parent::_initFormValues();
 }
Example #3
0
 /**
  * Initialize form fileds values
  *
  * @return $this
  */
 protected function _initFormValues()
 {
     $this->_eventManager->dispatch('adminhtml_block_eav_attribute_edit_form_init', ['form' => $this->getForm()]);
     $this->getForm()->addValues($this->getAttributeObject()->getData());
     return parent::_initFormValues();
 }
Example #4
0
 /**
  * Initialize form fileds values
  *
  * @return $this
  */
 protected function _initFormValues()
 {
     $this->getForm()->addValues($this->getWidgetInstance()->getData());
     return parent::_initFormValues();
 }