Class schmunk42\giiant\commands\BatchController

Inheritanceschmunk42\giiant\commands\BatchController » yii\console\Controller

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$crudBaseControllerClass string Base class for crud controllers schmunk42\giiant\commands\BatchController
$crudControllerNamespace string Namespace path for crud controller schmunk42\giiant\commands\BatchController
$crudPathPrefix string Route prefix for crud controller actions schmunk42\giiant\commands\BatchController
$crudProviders array List of code provider classes (fully namespaced path required) schmunk42\giiant\commands\BatchController
$crudSearchModelNamespace string Namespace path for crud search models schmunk42\giiant\commands\BatchController
$crudSearchModelSuffix string Suffix to append to the search model, setting "Search" will result in a model named "PostSearch" schmunk42\giiant\commands\BatchController
$crudSkipRelations array List of relations to skip, when generating view-views schmunk42\giiant\commands\BatchController
$crudViewPath string Namespace path for crud views schmunk42\giiant\commands\BatchController
$enableI18N boolean Whether the strings will be generated using Yii::t() or normal strings. schmunk42\giiant\commands\BatchController
$extendedModels bool Whether to overwrite extended models (from ModelBase) schmunk42\giiant\commands\BatchController
$messageCategory string The message category used by Yii::t() when $enableI18N is true. schmunk42\giiant\commands\BatchController
$modelBaseClass string Base class for the generated models schmunk42\giiant\commands\BatchController
$modelBaseClassSuffix string Suffix to append to the base model, setting "Base" will result in a model named "PostBase" schmunk42\giiant\commands\BatchController
$modelBaseTraits string Traits for base-models schmunk42\giiant\commands\BatchController
$modelDb string Database application component schmunk42\giiant\commands\BatchController
$modelGenerateQuery bool Indicates whether to generate ActiveQuery for the ActiveRecord class schmunk42\giiant\commands\BatchController
$modelNamespace string Namespace path for model classes schmunk42\giiant\commands\BatchController
$modelQueryBaseClass string The base class of the new ActiveQuery class schmunk42\giiant\commands\BatchController
$modelQueryNamespace string The namespace of the ActiveQuery class to be generated schmunk42\giiant\commands\BatchController
$overwrite bool Whether to generate and overwrite all files schmunk42\giiant\commands\BatchController
$singularEntities boolean Whether the entity names will be singular or the same as the table name. schmunk42\giiant\commands\BatchController
$tableNameMap array Mapping for table name to model class names schmunk42\giiant\commands\BatchController
$tablePrefix string Eg. app_ schmunk42\giiant\commands\BatchController
$tables array Table names for generating models and CRUDs schmunk42\giiant\commands\BatchController
$template string The generator template name schmunk42\giiant\commands\BatchController

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$appConfig array Application configuration for creating temporary applications schmunk42\giiant\commands\BatchController
$modelGenerator \schmunk42\giiant\commands\instance Of class schmunk42\giiant\generators\model\Generator schmunk42\giiant\commands\BatchController

Public Methods

Hide inherited methods

MethodDescriptionDefined By
actionCruds() Run batch process to generate CRUDs all given tables schmunk42\giiant\commands\BatchController
actionIndex() Run batch process to generate models and CRUDs for all given tables schmunk42\giiant\commands\BatchController
actionModels() Run batch process to generate models all given tables schmunk42\giiant\commands\BatchController
beforeAction() Loads application configuration and checks tables parameter schmunk42\giiant\commands\BatchController
options() schmunk42\giiant\commands\BatchController

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
getYiiConfiguration() Returns Yii's initial configuration array schmunk42\giiant\commands\BatchController

Property Details

$appConfig protected property

Application configuration for creating temporary applications

protected array $appConfig null
$crudBaseControllerClass public property

Base class for crud controllers

public string $crudBaseControllerClass 'yii\web\Controller'
$crudControllerNamespace public property

Namespace path for crud controller

public string $crudControllerNamespace 'backend\\controllers\\crud'
$crudPathPrefix public property

Route prefix for crud controller actions

public string $crudPathPrefix 'crud/'
$crudProviders public property

List of code provider classes (fully namespaced path required)

public array $crudProviders = []
$crudSearchModelNamespace public property

Namespace path for crud search models

public string $crudSearchModelNamespace 'backend\\models\\search'
$crudSearchModelSuffix public property

Suffix to append to the search model, setting "Search" will result in a model named "PostSearch"

$crudSkipRelations public property

List of relations to skip, when generating view-views

$crudViewPath public property

Namespace path for crud views

public string $crudViewPath '@backend/views/crud'
$enableI18N public property

Whether the strings will be generated using Yii::t() or normal strings.

public boolean $enableI18N true
$extendedModels public property

Whether to overwrite extended models (from ModelBase)

public bool $extendedModels false
$messageCategory public property

The message category used by Yii::t() when $enableI18N is true. Defaults to app.

public string $messageCategory 'app'
$modelBaseClass public property

Base class for the generated models

public string $modelBaseClass 'yii\db\ActiveRecord'
$modelBaseClassSuffix public property

Suffix to append to the base model, setting "Base" will result in a model named "PostBase"

$modelBaseTraits public property

Traits for base-models

public string $modelBaseTraits null
$modelDb public property

Database application component

public string $modelDb 'db'
$modelGenerateQuery public property

Indicates whether to generate ActiveQuery for the ActiveRecord class

public bool $modelGenerateQuery true
$modelGenerator protected property

Of class schmunk42\giiant\generators\model\Generator

protected \schmunk42\giiant\commands\instance $modelGenerator null
$modelNamespace public property

Namespace path for model classes

public string $modelNamespace 'common\\models'
$modelQueryBaseClass public property

The base class of the new ActiveQuery class

public string $modelQueryBaseClass 'yii\db\ActiveQuery'
$modelQueryNamespace public property

The namespace of the ActiveQuery class to be generated

public string $modelQueryNamespace 'app\models\query'
$overwrite public property

Whether to generate and overwrite all files

public bool $overwrite false
$singularEntities public property

Whether the entity names will be singular or the same as the table name.

public boolean $singularEntities true
$tableNameMap public property

Mapping for table name to model class names

public array $tableNameMap = []
$tablePrefix public property

Eg. app_

public string $tablePrefix ''
$tables public property

Table names for generating models and CRUDs

public array $tables = []
$template public property

The generator template name

public string $template 'default'

Method Details

actionCruds() public method

Run batch process to generate CRUDs all given tables

public void actionCruds ( )
throws \yii\console\Exception
actionIndex() public method

Run batch process to generate models and CRUDs for all given tables

public void actionIndex ( )
actionModels() public method

Run batch process to generate models all given tables

public void actionModels ( )
throws \yii\console\Exception
beforeAction() public method

Loads application configuration and checks tables parameter

public bool beforeAction ( $action )
$action \yii\base\Action
getYiiConfiguration() protected method

Returns Yii's initial configuration array

protected array getYiiConfiguration ( )
options() public method

public void options ( $id )
$id