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


PHP CActiveRecord::afterFind方法代碼示例

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


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

示例1: afterFind

 /**
  * After finding a user and getting a valid result
  * store the old attributes in $this->_oldAttributes
  * @return parent::afterFind();
  */
 public function afterFind()
 {
     if ($this !== NULL) {
         $this->_oldAttributes = $this->attributes;
     }
     return parent::afterFind();
 }
開發者ID:chezzy,項目名稱:yii-mblog,代碼行數:12,代碼來源:User.php

示例2: formattedDate

 public function formattedDate()
 {
     // From: http://stackoverflow.com/questions/6811706/yii-how-to-change-datetime-format-displayed-on-the-view
     // convert to display format
     return DateTime::createFromFormat('Y-m-d H:i:s', $this->date_entered)->format('M. d, Y');
     parent::afterFind();
 }
開發者ID:peteryu1,項目名稱:yiibook-cms-ch22,代碼行數:7,代碼來源:Comment.php

示例3: afterFind

 protected function afterFind()
 {
     parent::afterFind();
     if (!empty($this->dt_deadline)) {
         $this->dt_deadline = date('d.m.Y', strtotime($this->dt_deadline));
     }
 }
開發者ID:vetalded,項目名稱:homelibrary16mbcom,代碼行數:7,代碼來源:BBugs.php

示例4: afterFind

 protected function afterFind()
 {
     if (!empty($this->SpecialityID)) {
         $ps = Specialities::model()->findByPk($this->SpecialityID);
         if ($ps) {
             $this->FacultetID = $ps->facultet->idFacultet;
             $this->EducationFormID = $ps->eduform->idPersonEducationForm;
         }
     }
     if (isset($this->created)) {
         $this->created = date("d.m.Y", strtotime($this->created));
     }
     if (isset($this->updated)) {
         $this->updated = date("d.m.Y", strtotime($this->updated));
     }
     if (isset($this->SubjectsDate1)) {
         $this->SubjectsDate1 = date("d.m.Y", strtotime($this->SubjectsDate1));
     }
     if (isset($this->SubjectsDate2)) {
         $this->SubjectsDate2 = date("d.m.Y", strtotime($this->SubjectsDate2));
     }
     if (isset($this->SubjectsDate3)) {
         $this->SubjectsDate3 = date("d.m.Y", strtotime($this->SubjectsDate3));
     }
     return parent::afterFind();
 }
開發者ID:upmunspel,項目名稱:abiturient,代碼行數:26,代碼來源:Statements.php

示例5: afterFind

 protected function afterFind()
 {
     if (self::model()->scenario != 'nolink') {
         $this->link = UtilModel::urlToLink($this->link);
     }
     parent::afterFind();
 }
開發者ID:schrapps,項目名稱:risksur,代碼行數:7,代碼來源:EconEvaMethods.php

示例6: afterFind

 public function afterFind()
 {
     parent::afterFind();
     if (!empty($this->profile_cache)) {
         $this->_profileCache = (object) unserialize($this->profile_cache);
     }
 }
開發者ID:Canyian,項目名稱:hoauth,代碼行數:7,代碼來源:UserOAuth.php

示例7: afterFind

 protected function afterFind()
 {
     if (!$this->textarea) {
         $this->info = $this->unparse($this->info);
     }
     parent::afterFind();
 }
開發者ID:balrok,項目名稱:aiajaya,代碼行數:7,代碼來源:EInfotext.php

示例8: afterFind

 protected function afterFind()
 {
     if ($this->templatePath && file_exists($this->templatePath)) {
         $this->htmlTemplate = file_get_contents($this->templatePath);
     }
     parent::afterFind();
 }
開發者ID:jankichaudhari,項目名稱:yii-site,代碼行數:7,代碼來源:MailshotType.php

示例9: afterFind

 protected function afterFind()
 {
     if (!empty($this->params)) {
         $this->params = json_decode($this->params);
     }
     parent::afterFind();
 }
開發者ID:keyeMyria,項目名稱:CRM,代碼行數:7,代碼來源:WebForm.php

示例10: afterFind

 /**
  * After Find
  */
 public function afterFind()
 {
     foreach ($this->encrypt as $key) {
         $this->{$key} = $this->encryptDecrypt($this->{$key}, 'decrypt');
     }
     parent::afterFind();
 }
開發者ID:Rudianasaja,項目名稱:cycommerce,代碼行數:10,代碼來源:EncryptModel.php

示例11: afterFind

 /**
  * afterFind
  */
 protected function afterFind()
 {
     $this->description = UtilModel::urlToLink($this->description);
     $this->dataRequired = UtilModel::urlToLink($this->dataRequired);
     $this->expertiseRequired = UtilModel::urlToLink($this->expertiseRequired);
     $this->reference = UtilModel::urlToLink($this->reference);
     parent::afterFind();
 }
開發者ID:schrapps,項目名稱:risksur,代碼行數:11,代碼來源:EvaAttributesAssessmentMethods.php

示例12: afterFind

 public function afterFind()
 {
     if ($this->dateDBformat) {
         $this->dateDBformat = false;
         $this->date = date(Yii::app()->locale->getDateFormat('phpshort'), strtotime($this->date));
     }
     return parent::afterFind();
 }
開發者ID:hkhateb,項目名稱:linet3,代碼行數:8,代碼來源:Bankbook.php

示例13: afterFind

        public function afterFind()
        {
            $dateformat = Yii::app()->controller->cJuiDatePickerViewFormat;
            $this->paid_date = $this->getDisplayPayment_at();
            if(empty($this->paid_date)) $this->paid_date = date($dateformat);

            parent::afterFind();
        }
開發者ID:Rajagunasekaran,項目名稱:BACKUP,代碼行數:8,代碼來源:Paymentreceipt.php

示例14: afterFind

 protected function afterFind()
 {
     $controller = Yii::app()->controller->id;
     if ($controller == 'site' && Yii::app()->language == 'en') {
         $this->name = $this->name_en;
         $this->description = $this->description_en;
     }
     return parent::afterFind();
 }
開發者ID:phantsang,項目名稱:xzsUuJg0keDWW5Rx679PHBVBJ,代碼行數:9,代碼來源:ProductCategories.php

示例15: afterFind

 public function afterFind()
 {
     // Формируем массив
     $this->speciality = array();
     $psb = BasespecialityRelation::model()->findAll("`PersonBaseSpecialityID` = {$this->idPersonBaseSpeciality}");
     foreach ($psb as $item) {
         $this->speciality[] = $item->SpecialityID;
     }
     return parent::afterFind();
 }
開發者ID:upmunspel,項目名稱:abiturient,代碼行數:10,代碼來源:Personbasespeciality.php


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