/** * Find model by ID. * * @param integer|array $id Comment ID * * @return Comment Model * * @throws HttpException 404 error if comment not found */ protected function findModel($id) { /** @var Comment $model */ $model = Comment::findOne($id); if ($model !== null) { return $model; } else { throw new HttpException(404, Module::t('comments', 'FRONTEND_FLASH_RECORD_NOT_FOUND')); } }