PHP Class mootensai\enhancedgii\migration\Generator

Since: 1.1
Author: Misbahul D Munir ([email protected])
Inheritance: extends yii\gii\Generator
Afficher le fichier Open project: mootensai/yii2-enhanced-gii

Méthodes publiques

Свойство Type Description
$db
$generateRelations
$migrationName
$migrationPath
$migrationTime
$tableName
$useTablePrefix

Protected Properties

Свойство Type Description
$constans
$tableNames

Méthodes publiques

Méthode Description
attributeLabels ( )
autoCompleteData ( )
generate ( )
generateTableName ( string $tableName ) : string Generates the table name by considering table prefix.
getDescription ( )
getName ( )
getSchemaType ( ColumnSchema $column ) : array
hints ( )
init ( )
requiredTemplates ( )
rules ( )
stickyAttributes ( )
validateDb ( ) Validates the [[db]] attribute.
validateTableName ( ) Validates the [[tableName]] attribute.

Méthodes protégées

Méthode Description
generateColumns ( yii\db\TableSchema $table ) : array Generates validation rules for the specified table.
generateRelations ( ) : array
getDbConnection ( ) : Connection
getTableNames ( ) : array
reorderRecrusive ( array $tableNames, array &$depencies, array &$orders )
reorderTables ( array $tables, array $relations ) : array Reorder tables acourding with dependencies.

Method Details

attributeLabels() public méthode

public attributeLabels ( )

autoCompleteData() public méthode

public autoCompleteData ( )

generate() public méthode

public generate ( )

generateColumns() protected méthode

Generates validation rules for the specified table.
protected generateColumns ( yii\db\TableSchema $table ) : array
$table yii\db\TableSchema the table schema
Résultat array the generated validation rules

generateRelations() protected méthode

protected generateRelations ( ) : array
Résultat array the generated relation declarations

generateTableName() public méthode

If [[useTablePrefix]] is false, the table name will be returned without change.
public generateTableName ( string $tableName ) : string
$tableName string the table name (which may contain schema prefix)
Résultat string the generated table name

getDbConnection() protected méthode

protected getDbConnection ( ) : Connection
Résultat yii\db\Connection the DB connection as specified by [[db]].

getDescription() public méthode

public getDescription ( )

getName() public méthode

public getName ( )

getSchemaType() public méthode

public getSchemaType ( ColumnSchema $column ) : array
$column yii\db\ColumnSchema
Résultat array

getTableNames() protected méthode

protected getTableNames ( ) : array
Résultat array the table names that match the pattern specified by [[tableName]].

hints() public méthode

public hints ( )

init() public méthode

public init ( )

reorderRecrusive() protected méthode

protected reorderRecrusive ( array $tableNames, array &$depencies, array &$orders )
$tableNames array
$depencies array
$orders array

reorderTables() protected méthode

Reorder tables acourding with dependencies.
protected reorderTables ( array $tables, array $relations ) : array
$tables array
$relations array
Résultat array

requiredTemplates() public méthode

public requiredTemplates ( )

rules() public méthode

public rules ( )

stickyAttributes() public méthode

public stickyAttributes ( )

validateDb() public méthode

Validates the [[db]] attribute.
public validateDb ( )

validateTableName() public méthode

Validates the [[tableName]] attribute.
public validateTableName ( )

Property Details

$constans protected_oe property

protected $constans

$db public_oe property

public $db

$generateRelations public_oe property

public $generateRelations

$migrationName public_oe property

public $migrationName

$migrationPath public_oe property

public $migrationPath

$migrationTime public_oe property

public $migrationTime

$tableName public_oe property

public $tableName

$tableNames protected_oe property

protected $tableNames

$useTablePrefix public_oe property

public $useTablePrefix