/** * 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(); }
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(); }
protected function afterFind() { parent::afterFind(); if (!empty($this->dt_deadline)) { $this->dt_deadline = date('d.m.Y', strtotime($this->dt_deadline)); } }
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(); }
protected function afterFind() { if (self::model()->scenario != 'nolink') { $this->link = UtilModel::urlToLink($this->link); } parent::afterFind(); }
public function afterFind() { parent::afterFind(); if (!empty($this->profile_cache)) { $this->_profileCache = (object) unserialize($this->profile_cache); } }
protected function afterFind() { if (!$this->textarea) { $this->info = $this->unparse($this->info); } parent::afterFind(); }
protected function afterFind() { if ($this->templatePath && file_exists($this->templatePath)) { $this->htmlTemplate = file_get_contents($this->templatePath); } parent::afterFind(); }
protected function afterFind() { if (!empty($this->params)) { $this->params = json_decode($this->params); } parent::afterFind(); }
/** * After Find */ public function afterFind() { foreach ($this->encrypt as $key) { $this->{$key} = $this->encryptDecrypt($this->{$key}, 'decrypt'); } parent::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(); }
public function afterFind() { if ($this->dateDBformat) { $this->dateDBformat = false; $this->date = date(Yii::app()->locale->getDateFormat('phpshort'), strtotime($this->date)); } return parent::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(); }
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(); }
public function afterFind() { // Формируем массив $this->speciality = array(); $psb = BasespecialityRelation::model()->findAll("`PersonBaseSpecialityID` = {$this->idPersonBaseSpeciality}"); foreach ($psb as $item) { $this->speciality[] = $item->SpecialityID; } return parent::afterFind(); }
protected function afterFind() { if ($this->timeFrom) { $this->timeFrom = date("H:i", strtotime($this->timeFrom)); } if ($this->timeTo) { $this->timeTo = date("H:i", strtotime($this->timeTo)); } parent::afterFind(); }
protected function afterFind() { $this->_prepareDateAttributes(APP_DB_TIMESTAMP_FORMAT, APP_DATE_FORMAT); foreach ($this->_getCastAttributeTypes() as $key => $type) { $value = $this->getAttribute($key); settype($value, $type); $this->setAttribute($key, $value); } parent::afterFind(); }
public function afterfind() { // $dateformat = Yii::app()->controller->cJuiDatePickerViewFormat; // $this->date = $this->getDisplaydate(); // if(empty($this->date)) $this->date = date($dateformat); $dateformat = Yii::app()->controller->boosterTbDateRangePickerFormatHMS; $this->updated_at = $this->getUpdated_at(); if(empty($this->updated_at)) $this->updated_at = date($dateformat); parent::afterFind(); }
protected function afterFind() { parent::afterFind(); if (in_array($this->type, array(self::TYPE_FIXEDARRAY, self::TYPE_DYNAMICARRAY, self::TYPE_TWOPOWARRAY))) { $this->value = json_decode($this->value, true); // Так нельзя, придется править вывод списка в админке // $this->example = json_decode($this->example, true); } // Возвращаем именно тот тип данных, в котором хранится конфиг $this->checkReturnValue(); }
protected function afterFind() { parent::afterFind(); if (self::DISABLED == $this->status) { $this->status = self::DISABLED; } else { if (self::ACTIVE == $this->status) { $this->status = self::ACTIVE; } else { $this->status = null; } } }
public function afterFind() { // MSSQL delivers hex data $sDatabasetype = Yii::app()->db->getDriverName(); if ($sDatabasetype == 'sqlsrv' || $sDatabasetype == 'mssql' || $sDatabasetype == 'dblib') { $this->data = $this->hexToStr($this->data); } // Postgres delivers a stream pointer if (gettype($this->data) == 'resource') { $this->data = stream_get_contents($this->data, -1, 0); } return parent::afterFind(); }
public function afterFind() { $dateformat = Yii::app()->controller->cJuiDatePickerViewFormat; $this->acnt_date = $this->getDisplayAcnt_date(); if(empty($this->acnt_date)) $this->acnt_date = date($dateformat); if(strtolower($this->accounttype) === strtolower(Helper::CONST_Receivables)) { if(!empty($this->orders)) $this->order_or_ot_id = $this->orders[0]->id; } if(strtolower($this->accounttype) === strtolower(Helper::CONST_Payables)) { if(!empty($this->ordertasks)) $this->order_or_ot_id = $this->ordertasks[0]->id; } parent::afterFind(); }
public function afterFind() { foreach (Yii::app()->languageManager->languages as $language => $fullLanguage) { if ($language === Yii::app()->sourceLanguage) { $suffix = ''; } else { $suffix = '_' . $language; } $alias = CmsAlias::model()->multilang()->findByPk($this->alias->id); $this->{'title' . $suffix} = $alias->{'title' . $suffix}; if ($language == Yii::app()->language) { $this->title = $alias->{'title' . $suffix}; } } return parent::afterFind(); }
public function afterFind() { $dateformat = Yii::app()->controller->cJuiDatePickerViewFormat; $this->payment_at = $this->getDisplayPayment_at(); if(empty($this->payment_at)) $this->payment_at = date($dateformat); if(strtolower($this->direction) === strtolower(Helper::CONST_Inwards)) { if(!empty($this->order)) $this->order_or_ot_id = $this->order->id; } if(strtolower($this->direction) === strtolower(Helper::CONST_Outwards)) { if(!empty($this->ordertask)) $this->order_or_ot_id = $this->ordertask->id; } $this->details = str_replace(':', '', $this->details); parent::afterFind(); }
public function afterFind() { if (isset($this->getOwner()->foco_fetal)) { if ($this->getOwner()->foco_fetal == 0) { $this->getOwner()->foco_fetal = "+"; } else { $this->getOwner()->foco_fetal = "-"; } } if (isset($this->getOwner()->edemas)) { if ($this->getOwner()->edemas == 0) { $this->getOwner()->edemas = "Si"; } else { $this->getOwner()->edemas = "No"; } } parent::afterFind(); }
public function afterFind() { parent::afterFind(); }
public function afterFind() { $this->_fechaCompraDate = DateTime::createFromFormat('Y-m-d H:i:s', $this->fechaCompra); $this->_fechaEntregaDate = DateTime::createFromFormat('Y-m-d H:i:s', $this->fechaEntrega); return parent::afterFind(); }
public function afterFind() { $this->dari = !is_null($this->dari) ? date_format(date_create_from_format('Y-m-d H:i:s', $this->dari), 'd-m-Y H:i') : ''; $this->sampai = !is_null($this->sampai) ? date_format(date_create_from_format('Y-m-d H:i:s', $this->sampai), 'd-m-Y H:i') : ''; return parent::afterFind(); }
/** * This is invoked when a record is populated with data from a find() call. */ protected function afterFind() { parent::afterFind(); $this->_oldTags = $this->tags; }
protected function afterFind() { parent::afterFind(); // TODO: Change the autogenerated stub //替换掉ubb $this->content = preg_replace("/\\[[^\\]]*\\].*?\\[\\/[^\\]]*\\]/", "", $this->content); }