PHP Class schmunk42\giiant\commands\BatchController

Author: Tobias Munk ([email protected])
Inheritance: extends yii\console\Controller
Show file Open project: schmunk42/yii2-giiant Class Usage Examples

Public Properties

Property Type Description
$crudAccessFilter whether to add accessFilter in behavior
$crudBaseControllerClass base class for crud controllers
$crudBaseTraits
$crudControllerNamespace namespace path for crud controller
$crudFixOutput whether to fix generated code (PSR-2). Note: May take some time, depending on file size and numbers.
$crudIndexGridClass
$crudIndexWidgetType
$crudMessageCategory the message category for CRUDs used by Yii::t() when $enableI18N is true. Defaults to app
$crudPathPrefix route prefix for crud controller actions
$crudProviders list of code provider classes (fully namespaced path required)
$crudSearchModelNamespace namespace path for crud search models
$crudSearchModelSuffix suffix to append to the search model, setting "Search" will result in a model named "PostSearch"
$crudSkipRelations list of relations to skip, when generating view-views
$crudTemplate
$crudTidyOutput whether to tidy generated code
$crudViewPath namespace path for crud views
$enableI18N whether the strings will be generated using Yii::t() or normal strings
$extendedModels whether to overwrite extended models (from ModelBase)
$languageCodeColumn the column name where the language code is stored
$languageTableName the name of the table containing the translations. {{table}} will be replaced with the value in "Table Name" field
$modelBaseClass base class for the generated models
$modelBaseClassSuffix suffix to append to the base model, setting "Base" will result in a model named "PostBase"
$modelBaseTraits traits for base-models
$modelDb database application component
$modelGenerateHintsFromComments This indicates whether the generator should generate attribute hints by using the comments of the corresponding DB columns
$modelGenerateLabelsFromComments This indicates whether the generator should generate attribute labels by using the comments of the corresponding DB columns
$modelGenerateQuery indicates whether to generate ActiveQuery for the ActiveRecord class
$modelMessageCategory the message category for models used by Yii::t() when $enableI18N is true. Defaults to app
$modelNamespace namespace path for model classes
$modelQueryBaseClass the base class of the new ActiveQuery class
$modelQueryNamespace the namespace of the ActiveQuery class to be generated
$modelRemoveDuplicateRelations
$overwrite whether to generate and overwrite all files
$singularEntities whether the entity names will be singular or the same as the table name
$tableNameMap mapping for table name to model class names
$tablePrefix eg. app_
$tables table names for generating models and CRUDs
$template the generator template name
$useTimestampBehavior whether to use yii\behaviors\TimestampBehavior in models
$useTranslatableBehavior whether to use or not 2amigos/yii2-translateable-behavior

Protected Properties

Property Type Description
$appConfig application configuration for creating temporary applications
$modelGenerator of class schmunk42\giiant\generators\model\Generator

Public Methods

Method Description
actionCruds ( ) Run batch process to generate CRUDs all given tables.
actionIndex ( ) Run batch process to generate models and CRUDs for all given tables.
actionModels ( ) Run batch process to generate models all given tables.
beforeAction ( Action $action ) : boolean Loads application configuration and checks tables parameter.
options ( $id )

Protected Methods

Method Description
getYiiConfiguration ( ) : array Returns Yii's initial configuration array.

Private Methods

Method Description
createDirectoryFromNamespace ( $ns ) Helper function to create.

Method Details

actionCruds() public method

Run batch process to generate CRUDs all given tables.
public actionCruds ( )

actionIndex() public method

Run batch process to generate models and CRUDs for all given tables.
public actionIndex ( )

actionModels() public method

Run batch process to generate models all given tables.
public actionModels ( )

beforeAction() public method

Loads application configuration and checks tables parameter.
public beforeAction ( Action $action ) : boolean
$action yii\base\Action
return boolean

getYiiConfiguration() protected method

Returns Yii's initial configuration array.
protected getYiiConfiguration ( ) : array
return array

options() public method

public options ( $id )

Property Details

$appConfig protected property

application configuration for creating temporary applications
protected $appConfig

$crudAccessFilter public property

whether to add accessFilter in behavior
public $crudAccessFilter

$crudBaseControllerClass public property

base class for crud controllers
public $crudBaseControllerClass

$crudBaseTraits public property

public $crudBaseTraits

$crudControllerNamespace public property

namespace path for crud controller
public $crudControllerNamespace

$crudFixOutput public property

whether to fix generated code (PSR-2). Note: May take some time, depending on file size and numbers.
public $crudFixOutput

$crudIndexGridClass public property

public $crudIndexGridClass

$crudIndexWidgetType public property

public $crudIndexWidgetType

$crudMessageCategory public property

the message category for CRUDs used by Yii::t() when $enableI18N is true. Defaults to app
public $crudMessageCategory

$crudPathPrefix public property

route prefix for crud controller actions
public $crudPathPrefix

$crudProviders public property

list of code provider classes (fully namespaced path required)
public $crudProviders

$crudSearchModelNamespace public property

namespace path for crud search models
public $crudSearchModelNamespace

$crudSearchModelSuffix public property

suffix to append to the search model, setting "Search" will result in a model named "PostSearch"
public $crudSearchModelSuffix

$crudSkipRelations public property

list of relations to skip, when generating view-views
public $crudSkipRelations

$crudTemplate public property

public $crudTemplate

$crudTidyOutput public property

whether to tidy generated code
public $crudTidyOutput

$crudViewPath public property

namespace path for crud views
public $crudViewPath

$enableI18N public property

whether the strings will be generated using Yii::t() or normal strings
public $enableI18N

$extendedModels public property

whether to overwrite extended models (from ModelBase)
public $extendedModels

$languageCodeColumn public property

the column name where the language code is stored
public $languageCodeColumn

$languageTableName public property

the name of the table containing the translations. {{table}} will be replaced with the value in "Table Name" field
public $languageTableName

$modelBaseClass public property

base class for the generated models
public $modelBaseClass

$modelBaseClassSuffix public property

suffix to append to the base model, setting "Base" will result in a model named "PostBase"
public $modelBaseClassSuffix

$modelBaseTraits public property

traits for base-models
public $modelBaseTraits

$modelDb public property

database application component
public $modelDb

$modelGenerateHintsFromComments public property

This indicates whether the generator should generate attribute hints by using the comments of the corresponding DB columns
public $modelGenerateHintsFromComments

$modelGenerateLabelsFromComments public property

This indicates whether the generator should generate attribute labels by using the comments of the corresponding DB columns
public $modelGenerateLabelsFromComments

$modelGenerateQuery public property

indicates whether to generate ActiveQuery for the ActiveRecord class
public $modelGenerateQuery

$modelGenerator protected property

of class schmunk42\giiant\generators\model\Generator
protected $modelGenerator

$modelMessageCategory public property

the message category for models used by Yii::t() when $enableI18N is true. Defaults to app
public $modelMessageCategory

$modelNamespace public property

namespace path for model classes
public $modelNamespace

$modelQueryBaseClass public property

the base class of the new ActiveQuery class
public $modelQueryBaseClass

$modelQueryNamespace public property

the namespace of the ActiveQuery class to be generated
public $modelQueryNamespace

$modelRemoveDuplicateRelations public property

public $modelRemoveDuplicateRelations

$overwrite public property

whether to generate and overwrite all files
public $overwrite

$singularEntities public property

whether the entity names will be singular or the same as the table name
public $singularEntities

$tableNameMap public property

mapping for table name to model class names
public $tableNameMap

$tablePrefix public property

eg. app_
public $tablePrefix

$tables public property

table names for generating models and CRUDs
public $tables

$template public property

the generator template name
public $template

$useTimestampBehavior public property

whether to use yii\behaviors\TimestampBehavior in models
public $useTimestampBehavior

$useTranslatableBehavior public property

whether to use or not 2amigos/yii2-translateable-behavior
public $useTranslatableBehavior