本文整理汇总了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);
}
}