gii\generators\model\Generator getDescription()

getDescription() public method public string getDescription ( )return string The detailed description of the generator.

gii\generators\model\Generator getDbConnection()

getDbConnection() protected method protected yii\db\Connection getDbConnection ( )return yii\db\Connection The DB connection as specified by $db.

gii\generators\model\Generator generateTableName()

generateTableName() public method Generates the table name by considering table prefix. If $useTablePrefix is false, the table name will be returned without change. public string generateTableName ( $tableName )$tableName string The table name (which may contain schema prefix) return string The generated table name

gii\generators\model\Generator generateRules()

generateRules() public method Generates validation rules for the specified table. public array generateRules ( $table )$table yii\db\TableSchema The table schema return array The generated validation rules

gii\generators\model\Generator generateRelations()

generateRelations() protected method protected array generateRelations ( )return array The generated relation declarations

gii\generators\model\Generator generateRelationName()

generateRelationName() protected method Generate a relation name for the specified table and a base name. protected string generateRelationName ( $relations, $table, $key, $multiple )$relations array The relations being generated currently. $table yii\db\TableSchema The table schema $key string A base name that the relation name may be generated from $multiple boolean Whether this is a has-many relation return string The relation name

gii\generators\model\Generator generateRelationLink()

generateRelationLink() protected method Generates the link parameter to be used in generating the relation declaration. protected string generateRelationLink ( $refs )$refs array Reference constraint return string The generated link parameter.

gii\generators\model\Generator generateQueryClassName()

generateQueryClassName() protected method Generates a query class name from the specified model class name. protected string generateQueryClassName ( $modelClassName )$modelClassName string Model class name return string Generated class name

gii\generators\model\Generator generateLabels()

generateLabels() public method Generates the attribute labels for the specified table. public array generateLabels ( $table )$table yii\db\TableSchema The table schema return array The generated attribute labels (name => label)

gii\generators\model\Generator generateClassName()

generateClassName() protected method Generates a class name from the specified table name. protected string generateClassName ( $tableName, $useSchemaName = null )$tableName string The table name (which may contain schema prefix) $useSchemaName boolean Should schema name be included in the class name, if present return string The generated class name