protected function _beforeSave() { if ($pageType = $this->getData('page_type')) { $this->setData('additional_data', serialize(array('page_type' => $pageType))); } parent::_beforeSave(); }
protected function _beforeSave() { if (!($attributes = $this->getData('attributes'))) { $attributes = array(); } $this->setData('additional_data', serialize(array('attributes' => $attributes))); parent::_beforeSave(); }