本文整理匯總了PHP中UserController::actionDescription方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserController::actionDescription方法的具體用法?PHP UserController::actionDescription怎麽用?PHP UserController::actionDescription使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserController
的用法示例。
在下文中一共展示了UserController::actionDescription方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: actionDescription
public function actionDescription($gallError = "")
{
$this->firmId = (int) Yii::app()->request->getParam("fid", 0);
$id = (int) Yii::app()->request->getParam("id", 0);
// Если не указан ID фирмы, то берем ID из описания тура
if ($id > 0 && $this->firmId == 0) {
$tourModel = CatalogTours::fetch($id);
if ($tourModel->id > 0 && $tourModel->firm_id && $tourModel->firm_id->id > 0) {
$this->firmId = $tourModel->firm_id->id;
}
}
if ($this->firmId == 0) {
die("id==0");
$this->redirect(SiteHelper::createUrl("/user/firms"));
}
$firmModel = CatalogFirms::fetch($this->firmId);
if ($firmModel->id == 0) {
die("id==not correct");
$this->redirect(SiteHelper::createUrl("/user/firms"));
}
parent::init();
$this->addModel = "CatalogToursAdd";
$this->tableName = "catalog_tours";
$this->name = Yii::t("user", "туры");
$_POST["CatalogToursAdd"]["firm_id"] = $this->firmId;
$_POST["CatalogToursAdd"]["user_id"] = Yii::app()->user->getId();
parent::actionDescription();
}
示例2: actionDescription
public function actionDescription($gallError = "")
{
$_POST["CatalogFirmsServiceAdd"]["firm_id"] = $this->firmId;
$_POST["CatalogFirmsServiceAdd"]["user_id"] = Yii::app()->user->getId();
parent::actionDescription();
}