gii\generators\model\Generator generate()

generate() public method Generates the code based on the current user input and the specified code template files. This is the main method that child classes should implement. Please refer to yii\gii\generators\controller\Generator::generate() as an example on how to implement this method. public yii\gii\CodeFile[] generate ( )return yii\gii\CodeFile[] A list of code files to be created.

gii\generators\model\Generator checkJunctionTable()

checkJunctionTable() protected method Checks if the given table is a junction table, that is it has at least one pair of unique foreign keys. protected array|boolean checkJunctionTable ( $table )$table return array|boolean All unique foreign key pairs if the table is a junction table, or false if the table is not a junction table.

gii\generators\model\Generator autoCompleteData()

autoCompleteData() public method Returns the list of auto complete values. The array keys are the attribute names, and the array values are the corresponding auto complete values. Auto complete values can also be callable typed in order one want to make postponed data generation. public array autoCompleteData ( )return array The list of auto complete values

gii\generators\model\Generator attributeLabels()

attributeLabels() public method Returns the attribute labels. Attribute labels are mainly used for display purpose. For example, given an attribute firstName, we can declare a label First Name which is more user-friendly and can be displayed to end users. By default an attribute label is generated using generateAttributeLabel(). This method allows you to explicitly specify attribute labels. Note, in order to inherit labels defined in the parent class, a child class needs to merge the parent

gii\generators\model\Generator addInverseRelations()

addInverseRelations() protected method (available since version 2.0.5) Adds inverse relations protected array addInverseRelations ( $relations )$relations array Relation declarations return array Relation declarations extended with inverse relation names

gii\generators\model\Generator $useTablePrefix

$useTablePrefix public property public $useTablePrefix = false

gii\generators\model\Generator $useSchemaName

$useSchemaName public property public $useSchemaName = true

gii\generators\model\Generator $tablePrefix

$tablePrefix public read-only property public string getTablePrefix ( )

gii\generators\model\Generator $tableNames

$tableNames protected property protected $tableNames = null

gii\generators\model\Generator $tableName

$tableName public property public $tableName = null