function execute() { if (!Request::post('id')) { return; } connectionFaqAnswerModel::create()->where(array('id' => (int) Request::post('id')))->delete(); }
function execute() { $rows = Request::post('row'); $model = connectionFaqAnswerModel::create(); $index = 0; foreach ($rows as $row) { $model->where(array('id' => (int) $row))->update(array('sort' => $index)); $index++; } }
function execute() { $locale = new Locales('connection'); $list = $locale->getList(); if (Request::post('id')) { $answer = connectionFaqAnswerModel::create()->where(array('id' => (int) Request::post('id')))->fetchOne(); $this->smarty->assign('answer', $answer); } $this->smarty->assign('lang', $list); }
function execute() { $model = connectionFaqPartModel::create(); $result = array(); if (!Request::get('part_url')) { $partID = '0'; } else { $part = $model->getPartByUrl(Request::get('part_url'), Language::getActiveLanguageISO()); if (!$part) { $partID = '0'; } else { $result['part'] = $part; $partID = strval($part['id']); } } $result['answers'] = connectionFaqAnswerModel::create()->getList($partID, Language::getActiveLanguageISO()); $this->setSeoPage('faq'); return $result; }
function execute() { connectionFaqAnswerModel::create()->add(Request::post('answer')); return 'success'; }
static function getFaqAnswerList($part, $locale = 'ru') { return connectionFaqAnswerModel::create()->getList($part, $locale); }