This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mode () : | |
protected function beforeSave() | |
{ | |
if(parent::beforeSave()) | |
{ | |
if($this->isNewRecord) | |
{ | |
$this->create_time=$this->update_time=time(); | |
$this->author_id=Yii::app()->user->id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model : | |
const type_one = 1; | |
const type_two = 2; | |
const type_three = 3; | |
public function getType(){ | |
return array( | |
self::type_one => "one", | |
self::type_two => "two", |
NewerOlder