프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$baseModelClass | |||
$db | |||
$modelClass | |||
$nsModel | |||
$nsSearchModel | |||
$skippedRelations | |||
$tableName | |||
$tableSchema | * @var $tableSchema TableSchema | ||
$useSchemaName |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$classNames | |||
$tableNames |
메소드 | 설명 | |
---|---|---|
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. |
메소드 | 설명 | |
---|---|---|
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 |
메소드 | 설명 | |
---|---|---|
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 |
리턴 | array | relation declarations extended with inverse relation names |
protected checkPivotTable ( yii\db\TableSchema $table ) : array | boolean | ||
$table | yii\db\TableSchema | |
리턴 | 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 |
리턴 | 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 |
리턴 | string | the relation name |
protected generateRelations ( ) : array | ||
리턴 | array | the generated relation declarations |
public generateTableName ( string $tableName ) : string | ||
$tableName | string | the table name (which may contain schema prefix) |
리턴 | string | the generated table name |
public getDbConnection ( ) : |
||
리턴 | the DB connection as specified by [[db]]. |
protected getSchemaNames ( ) : string[] | ||
리턴 | string[] | all db schema names or an array with a single empty string |
protected getTableNames ( ) : array | ||
리턴 | 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 | |
리턴 | boolean |