当前位置: 首页>>代码示例>>PHP>>正文


PHP UserController::init方法代码示例

本文整理汇总了PHP中UserController::init方法的典型用法代码示例。如果您正苦于以下问题:PHP UserController::init方法的具体用法?PHP UserController::init怎么用?PHP UserController::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserController的用法示例。


在下文中一共展示了UserController::init方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
 }
开发者ID:bogiesoft,项目名称:yii-travel,代码行数:28,代码来源:ToursController.php

示例2: init

 public function init()
 {
     parent::init();
     $this->addModel = "CatalogKurortsAdd";
     $this->tableName = "catalog_kurorts";
     $this->name = Yii::t("user", "зоны отдыха/дачи");
 }
开发者ID:bogiesoft,项目名称:yii-travel,代码行数:7,代码来源:ResortController.php

示例3: init

 public function init()
 {
     parent::init();
     $this->addModel = "Notifications";
     $this->tableName = "Notifications";
     $this->name = Yii::t("user", "Сообщения");
     $this->firmId = (int) Yii::app()->request->getParam("fid", 0);
     $id = (int) Yii::app()->request->getParam("id", 0);
     $return = false;
 }
开发者ID:bogiesoft,项目名称:yii-travel,代码行数:10,代码来源:MessagesController.php

示例4: init

 public function init()
 {
     parent::init();
     $this->addModel = "CatalogWorkResumeAdd";
     $this->tableName = "catalog_work";
     $this->name = Yii::t("user", "Мои резюме");
     $this->dopSQL = " AND type_id=1";
     $this->firmId = (int) Yii::app()->request->getParam("fid", 0);
     $id = (int) Yii::app()->request->getParam("id", 0);
     $return = false;
 }
开发者ID:bogiesoft,项目名称:yii-travel,代码行数:11,代码来源:ResumeController.php

示例5: __construct

 public function __construct()
 {
     switch (strtolower(@$_POST['action'])) {
         case "user":
             UserController::init();
             break;
         case "publicar":
             PublicacaoController::init();
             break;
     }
 }
开发者ID:adrielcardoso,项目名称:mongodb_teste,代码行数:11,代码来源:MainController.php

示例6: init

 public function init()
 {
     parent::init();
     $this->addModel = "CatalogFirmsServiceAdd";
     $this->tableName = "catalog_firms_service";
     $this->name = Yii::t("user", "Услуги компании");
     $this->firmId = (int) Yii::app()->request->getParam("fid", 0);
     $id = (int) Yii::app()->request->getParam("id", 0);
     $return = false;
     // Если не указан ID фирмы, то берем ID из описания тура
     if ($id > 0 && $this->firmId == 0) {
         $class = $this->addModel;
         $tourModel = $class::fetch($id);
         if ($tourModel->id > 0 && $tourModel->firm_id && $tourModel->firm_id->id > 0) {
             $this->firmId = $tourModel->firm_id->id;
         } else {
             $return = true;
         }
     }
     if ($return == true) {
         $this->redirect(SiteHelper::createUrl("/user/firms"));
     }
 }
开发者ID:bogiesoft,项目名称:yii-travel,代码行数:23,代码来源:FirmServiceController.php


注:本文中的UserController::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。