/** * Smaze clanek podle predaneho id * @param string $id * @throws Exception */ protected function deleteArticle($id = "") { try { if (strlen($id) < 1) { throw new LBoxExceptionXT(LBoxExceptionXT::MSG_PARAM_STRING_NOTNULL, LBoxExceptionXT::CODE_BAD_PARAM); } $record = new ArticlesRecord($id); $record->delete(); } catch (Exception $e) { throw $e; } }
public function store() { try { $articlesTypesNewsName = $this->getClassVar("articlesTypesNewsName"); $articlesTypes = new ArticlesTypesRecords(array("name" => $articlesTypesNewsName)); $this->params["ref_type"] = $articlesTypes->current()->id; parent::store(); } catch (Exception $e) { throw $e; } }