/** * Post-processor for $table->store($updateNulls) * * @param boolean &$result The result of the load * * @return void * * @since 3.2 */ public function onAfterStore(&$result) { if ($result) { $this->parseTypeAlias(); $aliasParts = explode('.', $this->contenthistoryHelper->typeAlias); if (JComponentHelper::getParams($aliasParts[0])->get('save_history', 0)) { $this->contenthistoryHelper->store($this->table); } } }
/** * The event which runs after storing (saving) data to the database * * @param DataModel &$model The model which calls this event * * @return boolean True to allow saving without an error */ public function onAfterSave(&$model) { $aliasParts = explode('.', $model->getContentType()); $model->checkContentType(); if (\JComponentHelper::getParams($aliasParts[0])->get('save_history', 0)) { if (!$this->historyHelper) { $this->historyHelper = new \JHelperContenthistory($model->getContentType()); } $this->historyHelper->store($model); } return true; }
/** * The event which runs after storing (saving) data to the database * * @param FOFTable &$table The table which calls this event * * @return boolean True to allow saving without an error */ public function onAfterStore(&$table) { $aliasParts = explode('.', $table->getContentType()); $table->checkContentType(); if (JComponentHelper::getParams($aliasParts[0])->get('save_history', 0)) { $historyHelper = new JHelperContenthistory($table->getContentType()); $historyHelper->store($table); } return true; }