public function AjaxDelTransAction() { if (isset($_POST['id'])) { $id = $_POST['id']; $model = new WordsModel(); $model->validateId($id); if (count($model->errors) > 0) { echo $model->helper['MainHelper']->getError('0x00004'); } else { $model->removeTranslation($id); } } }