/** * Удаление вопросов, соответсвующих заданному тесту (по $testId ) * * @param int $testId * @return void */ public function removeQuestionsByTestId($testId) { $arrQuestionsId = $this->_getQuestionIdListByTestId($testId); if (!empty($arrQuestionsId)) { // Удаляем ответы для вопросов теста $objAnswers = new Answers(); $objAnswers->removeAnswersByQuestionIdList($arrQuestionsId); // Удаляем вопросы теста $where = array('tq_id IN ( ? )' => implode(', ', $arrQuestionsId)); $this->delete($where); } }