本文整理汇总了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();
}
示例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();
}
示例3: afterFind
protected function afterFind()
{
parent::afterFind();
if (!empty($this->dt_deadline)) {
$this->dt_deadline = date('d.m.Y', strtotime($this->dt_deadline));
}
}
示例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();
}
示例5: afterFind
protected function afterFind()
{
if (self::model()->scenario != 'nolink') {
$this->link = UtilModel::urlToLink($this->link);
}
parent::afterFind();
}
示例6: afterFind
public function afterFind()
{
parent::afterFind();
if (!empty($this->profile_cache)) {
$this->_profileCache = (object) unserialize($this->profile_cache);
}
}
示例7: afterFind
protected function afterFind()
{
if (!$this->textarea) {
$this->info = $this->unparse($this->info);
}
parent::afterFind();
}
示例8: afterFind
protected function afterFind()
{
if ($this->templatePath && file_exists($this->templatePath)) {
$this->htmlTemplate = file_get_contents($this->templatePath);
}
parent::afterFind();
}
示例9: afterFind
protected function afterFind()
{
if (!empty($this->params)) {
$this->params = json_decode($this->params);
}
parent::afterFind();
}
示例10: afterFind
/**
* After Find
*/
public function afterFind()
{
foreach ($this->encrypt as $key) {
$this->{$key} = $this->encryptDecrypt($this->{$key}, 'decrypt');
}
parent::afterFind();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}