Class yii\gii\controllers\DefaultController
Inheritance | yii\gii\controllers\DefaultController » yii\web\Controller |
---|---|
Available since version | 2.0 |
Public Properties
Public Methods
Method | Description | Defined By |
---|---|---|
actionAction() | Runs an action defined in the generator. | yii\gii\controllers\DefaultController |
actionDiff() | yii\gii\controllers\DefaultController | |
actionIndex() | yii\gii\controllers\DefaultController | |
actionPreview() | yii\gii\controllers\DefaultController | |
actionView() | yii\gii\controllers\DefaultController | |
beforeAction() | yii\gii\controllers\DefaultController |
Protected Methods
Method | Description | Defined By |
---|---|---|
loadGenerator() | Loads the generator with the specified ID. | yii\gii\controllers\DefaultController |
Property Details
Method Details
Runs an action defined in the generator.
Given an action named "xyz", the method "actionXyz()" in the generator will be called. If the method does not exist, a 400 HTTP exception will be thrown.
public mixed actionAction ( $id, $name ) | ||
$id | string | The ID of the generator |
$name | string | The action name |
return | mixed | The result of the action. |
---|---|---|
throws | \yii\web\NotFoundHttpException | if the action method does not exist. |
public void actionDiff ( $id, $file ) | ||
$id | ||
$file |
public void actionIndex ( ) |
public void actionPreview ( $id, $file ) | ||
$id | ||
$file |
public void actionView ( $id ) | ||
$id |
public void beforeAction ( $action ) | ||
$action |
Loads the generator with the specified ID.
protected yii\gii\Generator loadGenerator ( $id ) | ||
$id | string | The ID of the generator to be loaded. |
return | yii\gii\Generator | The loaded generator |
---|---|---|
throws | \yii\web\NotFoundHttpException |