Свойство | Type | Description | |
---|---|---|---|
$baseModelClass | |||
$db | |||
$modelClass | |||
$nsModel | |||
$nsSearchModel | |||
$skippedRelations | |||
$tableName | |||
$tableSchema | * @var $tableSchema TableSchema | ||
$useSchemaName |
Свойство | Type | Description | |
---|---|---|---|
$classNames | |||
$tableNames |
Méthode | Description | |
---|---|---|
autoCompleteData ( ) | ||
generateTableName ( string $tableName ) : string | Generates the table name by considering table prefix. | |
getColumnNames ( ) : integer[] | ||
getDbConnection ( ) : |
||
getTableSchema ( ) | ||
getTreeColumns ( ) | ||
validateDb ( ) | Validates the [[db]] attribute. | |
validateModelClass ( ) | Checks if model class is valid | |
validateTableName ( ) | Validates the [[tableName]] attribute. |
Méthode | Description | |
---|---|---|
addInverseRelations ( array $relations ) : array | Adds inverse relations | |
checkPivotTable ( yii\db\TableSchema $table ) : array | boolean | Checks if the given table is a junction table. | |
generateClassName ( string $tableName, boolean $useSchemaName = null ) : string | Generates a class name from the specified table name. | |
generateRelationLink ( array $refs ) : string | Generates the link parameter to be used in generating the relation declaration. | |
generateRelationName ( array $relations, yii\db\TableSchema $table, string $key, boolean $multiple ) : string | Generate a relation name for the specified table and a base name. | |
generateRelations ( ) : array | ||
getSchemaNames ( ) : string[] | ||
getTableNames ( ) : array | ||
isHasManyRelation ( yii\db\TableSchema $table, array $fks ) : boolean | Determines if relation is of has many type |
Méthode | Description | |
---|---|---|
generateManyManyRelations ( yii\db\TableSchema $table, array $fks, array $relations ) : array | Generates relations using a junction table by adding an extra viaTable(). |
protected addInverseRelations ( array $relations ) : array | ||
$relations | array | relation declarations |
Résultat | array | relation declarations extended with inverse relation names |
protected checkPivotTable ( yii\db\TableSchema $table ) : array | boolean | ||
$table | yii\db\TableSchema | |
Résultat | array | boolean | the relevant foreign key constraint information if the table is a junction table, or false if the table is not a junction table. |
protected generateRelationLink ( array $refs ) : string | ||
$refs | array | reference constraint |
Résultat | string | the generated link parameter. |
protected generateRelationName ( array $relations, yii\db\TableSchema $table, string $key, boolean $multiple ) : string | ||
$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 |
Résultat | string | the relation name |
protected generateRelations ( ) : array | ||
Résultat | array | the generated relation declarations |
public generateTableName ( string $tableName ) : string | ||
$tableName | string | the table name (which may contain schema prefix) |
Résultat | string | the generated table name |
public getColumnNames ( ) : integer[] | ||
Résultat | integer[] | model column names |
public getDbConnection ( ) : |
||
Résultat | the DB connection as specified by [[db]]. |
protected getSchemaNames ( ) : string[] | ||
Résultat | string[] | all db schema names or an array with a single empty string |
protected getTableNames ( ) : array | ||
Résultat | array | the table names that match the pattern specified by [[tableName]]. |
protected isHasManyRelation ( yii\db\TableSchema $table, array $fks ) : boolean | ||
$table | yii\db\TableSchema | |
$fks | array | |
Résultat | boolean |
public validateTableName ( ) |