<?php /** * This is the template for generating the model class of a specified table. * In addition to the default model Code, this adds the CSaveRelationsBehavior * to the model class definition. * - $this: the ModelCode object * - $tableName: the table name for this class (prefix is already removed if necessary) * - $modelClass: the model class name * - $columns: list of table columns (name=>CDbColumnSchema) * - $labels: list of attribute labels (name=>label) * - $rules: list of validation rules * - $relations: list of relations (name=>relation declaration) * - $representingColumn: the name of the representing column for the table (string) or * the names of the representing columns (array) */ ?> <?php echo "<?php\n"; ?> Yii::import('<?php echo "{$this->baseModelPath}.{$this->baseModelClass}"; ?>'); class <?php echo $modelClass; ?> extends <?php echo $this->baseModelClass."\n"; ?> { public static function model($className=__CLASS__) { return parent::model($className); } }