Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (50 sloc) 927 Bytes
<snippet>
<content><![CDATA[
<?php
class ${1:ModelName} extends ${2:CActiveRecord}
{
/**
* Returns the static model of the specified AR class.
* @return CActiveRecord the static model class
*/
public static function model(\$className=__CLASS__)
{
return parent::model(\$className);
}
/**
* @return string the associated database table name
*/
public function tableName()
{
return '${3:table_name}';
}
/**
* @return array validation rules for model attributes.
*/
public function rules()
{
return array(
);
}
/**
* @return array relational rules.
*/
public function relations()
{
return array(
);
}
/**
* @return array customized attribute labels (name=&gt;label)
*/
public function attributeLabels()
{
return array(
);
}
}
]]></content>
<tabTrigger>model</tabTrigger>
<scope>text</scope>
<description>Yii Create model class</description>
</snippet>