PHP Class luya\console\commands\BaseCrudController
As we can not ensure to access the gii model generate class we have to copy the base of the class, check the see section.
Show file
Open project: luyadev/luya
Public Properties
Protected Properties
Public Methods
Method |
Description |
|
generateLabels ( yii\db\TableSchema $table ) : array |
Generates the attribute labels for the specified table. |
|
generateRules ( yii\db\TableSchema $table ) : array |
Generates validation rules for the specified table. |
|
getSqlTablesArray ( ) : array |
Get the sql tables from the current database connection |
|
Protected Methods
Method Details
generateClassName()
protected method
Generates a class name from the specified table name.
protected generateClassName ( string $tableName, boolean $useSchemaName = null ) : string |
$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 |
generateLabels()
public method
Generates the attribute labels for the specified table.
public generateLabels ( yii\db\TableSchema $table ) : array |
$table |
yii\db\TableSchema |
the table schema |
return |
array |
the generated attribute labels (name => label) |
generateRules()
public method
Generates validation rules for the specified table.
public generateRules ( yii\db\TableSchema $table ) : array |
$table |
yii\db\TableSchema |
the table schema |
return |
array |
the generated validation rules |
getDbConnection()
protected method
protected getDbConnection ( ) : Connection |
return |
Connection |
the DB connection as specified by [[db]]. |
getSqlTablesArray()
public method
Get the sql tables from the current database connection
isColumnAutoIncremental()
protected method
Checks if any of the specified columns is auto incremental.
protected isColumnAutoIncremental ( yii\db\TableSchema $table, array $columns ) : boolean |
$table |
yii\db\TableSchema |
the table schema |
$columns |
array |
columns to check for autoIncrement property |
return |
boolean |
whether any of the specified columns is auto incremental. |
Property Details
$classNames protected property
$tableName public property
$tableNames protected property
$useSchemaName public property
Whether to use schem name or not