本文整理匯總了PHP中LogHelper::saveCatLogTours方法的典型用法代碼示例。如果您正苦於以下問題:PHP LogHelper::saveCatLogTours方法的具體用法?PHP LogHelper::saveCatLogTours怎麽用?PHP LogHelper::saveCatLogTours使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類LogHelper
的用法示例。
在下文中一共展示了LogHelper::saveCatLogTours方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: actionDescription
public function actionDescription()
{
Yii::app()->page->setInfo(array("description" => $this->description, "keyWord" => $this->keyWord));
$id = 0;
$class = $this->classModel;
if (!empty($_GET["slug"])) {
$model = $class::fetchBySlug(trim($_GET["slug"]));
if ($model->id > 0) {
$_GET["id"] = $model->id;
$id = $model->id;
} else {
$arrId = explode("-", $_GET["slug"]);
if (sizeof($arrId) > 0) {
$id = (int) $arrId[0];
}
}
}
$error = Yii::t("page", "Произошла ошибка перехода на страницу, проверьте правильно написания адреса страницы");
if ($id > 0) {
$item = CatalogTours::fetch($id);
if ($item->id > 0) {
LogHelper::saveCatLogTours($item->id);
CCModelHelper::colCounter($item);
// Картинки тура
$images = ImageHelper::getImages($item);
Yii::app()->page->title = $item->name . ", тур " . $item->category_id->name . ", " . $item->country_id->name;
$this->render('description', array("item" => $item, "images" => $images, "otherTours" => CatalogTours::fetchAll(DBQueryParamsClass::CreateParams()->setConditions("image>'' AND country_id=:country_id AND id!=:id AND firm_id!=:firm_id")->setParams(array(":country_id" => $item->country_id->id, ":id" => $item->id, ":firm_id" => $item->firm_id->id))->setOrderBy("col DESC")->setLimit(6)), "firmsTours" => CatalogTours::fetchAll(DBQueryParamsClass::CreateParams()->setConditions("image>'' AND firm_id=:firm_id AND id!=:id")->setParams(array(":firm_id" => $item->firm_id->id, ":id" => $item->id))->setOrderBy("col DESC")->setLimit(6)), "tourCount" => CatalogTours::count(DBQueryParamsClass::CreateParams()->setConditions("country_id=:country")->setParams(array(":country" => $item->country_id->id))), "firmCount" => CatalogFirms::count(DBQueryParamsClass::CreateParams()->setConditions("country_id=:country")->setParams(array(":country" => $item->country_id->id)))));
} else {
throw new CHttpException("", $error);
}
} else {
throw new CHttpException("", $error);
}
}