/** * @overide * @return Df_YandexMarket_Model_System_Config_Backend_Conditions */ protected function _beforeSave() { try { if ($this->validate()) { $this->getRule()->loadPost(array('conditions' => df_a(df_a($this->getPost(), 'rule'), 'conditions'), 'website_ids' => $this->getWebsiteIds())); $this->getRule()->setDataChanges(true); $this->getRule()->save(); df_assert_between($this->getRule()->getId(), 1); $this->setValue($this->getRule()->getId()); } } catch (Exception $e) { df_log_exception($e); rm_session()->addError($e->getMessage()); } parent::_beforeSave(); return $this; }
/** * @param DataObject|mixed[]|mixed|E $v * @return void */ function df_log($v) { $v instanceof E ? df_log_exception($v) : df_logger()->debug(df_dump($v)); }