Class yii\gii\console\GenerateController
Inheritance | yii\gii\console\GenerateController » yii\console\Controller |
---|---|
Available since version | 2.0 |
This is the command line version of Gii - a code generator.
You can use this command to generate models, controllers, etc. For example, to generate an ActiveRecord model based on a DB table, you can run:
$ ./yii gii/model --tableName=city --modelClass=City
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$generators | array | A list of the available code generators | yii\gii\console\GenerateController |
$module | yii\gii\Module | yii\gii\console\GenerateController | |
$overwrite | boolean | Whether to overwrite all existing code files when in non-interactive mode. | yii\gii\console\GenerateController |
Public Methods
Protected Methods
Method | Description | Defined By |
---|---|---|
formatHint() | yii\gii\console\GenerateController |
Property Details
A list of the available code generators
Whether to overwrite all existing code files when in non-interactive mode.
Defaults to false, meaning none of the existing code files will be overwritten.
This option is used only when --interactive=0
.
Method Details
public void __get ( $name ) | ||
$name |
public void __set ( $name, $value ) | ||
$name | ||
$value |
public void actionIndex ( ) |
public void actions ( ) |
public void createAction ( $id ) | ||
$id |
protected void formatHint ( $hint ) | ||
$hint |
public void getActionArgsHelp ( $action ) | ||
$action |
public void getActionHelp ( $action ) | ||
$action |
public void getActionHelpSummary ( $action ) | ||
$action |
public void getActionOptionsHelp ( $action ) | ||
$action |
public void getUniqueID ( ) |
public void init ( ) |
public void options ( $id ) | ||
$id |