當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CActiveRecord::init方法代碼示例

本文整理匯總了PHP中CActiveRecord::init方法的典型用法代碼示例。如果您正苦於以下問題:PHP CActiveRecord::init方法的具體用法?PHP CActiveRecord::init怎麽用?PHP CActiveRecord::init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CActiveRecord的用法示例。


在下文中一共展示了CActiveRecord::init方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

 public function init()
 {
     parent::init();
     $this->genderTypes = Yii::app()->config->gender_types;
     $this->educationTypes = Yii::app()->config->education_types;
     $this->statusTypes = Yii::app()->config->statuses;
     $this->maritalStatuses = Yii::app()->config->marital_statuses;
 }
開發者ID:jerichozis,項目名稱:portal,代碼行數:8,代碼來源:CvList.php

示例2: init

 public function init()
 {
     parent::init();
     $this->createTime = date('Y-m-d H:i:s');
     $this->modifyTime = $this->createTime;
     $this->version = 0;
     $this->mark = null;
 }
開發者ID:liuwanwei,項目名稱:bdmedia,代碼行數:8,代碼來源:Video.php

示例3: init

 public function init()
 {
     if ($this->scenario === 'custom') {
         $this->fea_type = self::TYPE_CUSTOM;
         $this->fea_weight = 0;
     }
     parent::init();
 }
開發者ID:jankichaudhari,項目名稱:yii-site,代碼行數:8,代碼來源:Feature.php

示例4: init

 public function init($lessonId = 0, $userId = 0)
 {
     if ($lessonId != 0) {
         $this->lessonId = $lessonId;
     }
     if ($userId != 0) {
         $this->userId = $userId;
     }
     return parent::init();
 }
開發者ID:stan5621,項目名稱:jp_edu_online,代碼行數:10,代碼來源:LessonLearn.php

示例5: init

 public function init()
 {
     parent::init();
     // Set language
     if (!isset(Yii::app()->request->cookies['lang'])) {
         $language = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']) ?: 'en_US';
         $cookie = new CHttpCookie('lang', $language);
         $cookie->expire = time() + 60 * 60 * 24 * 30;
         Yii::app()->request->cookies['lang'] = $cookie;
     } else {
         $language = (string) Yii::app()->request->cookies['lang'];
     }
     Yii::app()->setLanguage($language);
 }
開發者ID:latik,項目名稱:yii-user,代碼行數:14,代碼來源:User.php

示例6: init

 public function init()
 {
     parent::init();
     $this->site = 'http://' . $_SERVER['SERVER_NAME'] . '/';
     $this->page_psw = '';
     $this->support = Yii::app()->params['adminEmail'];
     $this->campaign = '';
     $this->name = '';
     $this->login = '';
     $this->password = '';
     $this->page_cabinet = '';
     $this->page_order = '';
     $this->name_order = '';
     $this->num_order = '';
     $this->subject_order = '';
     $this->price_order = '';
     $this->price_order_part = '';
     $this->sum_order = '';
     $this->message = '';
     $this->page_payment = '';
     $this->specialization = '';
     $this->name_part = '';
 }
開發者ID:kibercoder,項目名稱:dipstart-development,代碼行數:23,代碼來源:Emails.php

示例7: init

 public function init()
 {
     parent::init();
     if (array_key_exists('SERVER_NAME', $_SERVER)) {
         $this->site = 'http://' . $_SERVER['SERVER_NAME'] . '/';
     }
     $this->page_psw = '';
     $this->support = Company::getSupportEmail();
     $this->campaign = Company::getName();
     $this->company = Company::getName();
     $this->name = '';
     $this->login = '';
     $this->password = '';
     $this->page_cabinet = '';
     $this->page_order = '';
     $this->name_order = '';
     $this->num_order = '';
     $this->subject_order = '';
     $this->price_order = '';
     $this->price_order_part = '';
     $this->sum_order = '';
     $this->message = '';
     $this->page_payment = '';
     $this->specialization = '';
     $this->name_part = '';
 }
開發者ID:akoch-ov,項目名稱:dipstart-development,代碼行數:26,代碼來源:Emails.php

示例8: init

 public function init()
 {
     return parent::init();
 }
開發者ID:awecode,項目名稱:awecms,代碼行數:4,代碼來源:Menu.php

示例9: init

 public function init()
 {
     $this->user_id = Yii::app()->user->id;
     // default user
     parent::init();
 }
開發者ID:pavlm,項目名稱:ycomments,代碼行數:6,代碼來源:Comment.php

示例10: init

 public function init()
 {
     $this->LugaresIni = 1;
     $this->LugaresFin = 1;
     return parent::init();
 }
開發者ID:cicb,項目名稱:tpc,代碼行數:6,代碼來源:Filas.php

示例11: init

 public function init()
 {
     parent::init();
     $this->surveysCount = 1;
     $this->serviceRatio = 100;
 }
開發者ID:shnellpavel,項目名稱:bcgroup_lk,代碼行數:6,代碼來源:SurveyPurpose.php

示例12: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->statusTypes = Yii::app()->config->user_statuses;
 }
開發者ID:jerichozis,項目名稱:portal,代碼行數:8,代碼來源:User.php

示例13: init

 public function init()
 {
     if ($this->getScenario() == 'insert') {
         $date = new DateTime();
         $date->setTime(0, 0, 0);
         $this->start_date = $date->format(self::DF_LOCAL);
         $date->setTime(23, 59, 59);
         $this->end_date = $date->add(new DateInterval("P1D"))->format(self::DF_LOCAL);
     }
     return parent::init();
 }
開發者ID:nsarvar,項目名稱:performance,代碼行數:11,代碼來源:Task.php

示例14: init

 public function init()
 {
     //$this->pathUrlImagesBD = Yii::app()->baseUrl . '/imagesbd/';
     $this->pathUrlImagesBD = 'https://' . $_SERVER['SERVER_NAME'] . '/imagesbd/';
     return parent::init();
 }
開發者ID:cicb,項目名稱:tpc,代碼行數:6,代碼來源:Funciones.php

示例15: init

 /**
  * Inits the content record
  */
 public function init()
 {
     parent::init();
     // Intercept this controller
     Yii::app()->interceptor->intercept($this);
 }
開發者ID:ahdail,項目名稱:humhub,代碼行數:9,代碼來源:Content.php


注:本文中的CActiveRecord::init方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。