PHP Class schmunk42\giiant\commands\BatchController

Author: Tobias Munk ([email protected])
Inheritance: extends yii\console\Controller
Mostrar archivo 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_oe property

application configuration for creating temporary applications
protected $appConfig

$crudAccessFilter public_oe property

whether to add accessFilter in behavior
public $crudAccessFilter

$crudBaseControllerClass public_oe property

base class for crud controllers
public $crudBaseControllerClass

$crudBaseTraits public_oe property

public $crudBaseTraits

$crudControllerNamespace public_oe property

namespace path for crud controller
public $crudControllerNamespace

$crudFixOutput public_oe property

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

$crudIndexGridClass public_oe property

public $crudIndexGridClass

$crudIndexWidgetType public_oe property

public $crudIndexWidgetType

$crudMessageCategory public_oe property

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

$crudPathPrefix public_oe property

route prefix for crud controller actions
public $crudPathPrefix

$crudProviders public_oe property

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

$crudSearchModelNamespace public_oe property

namespace path for crud search models
public $crudSearchModelNamespace

$crudSearchModelSuffix public_oe property

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

$crudSkipRelations public_oe property

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

$crudTemplate public_oe property

public $crudTemplate

$crudTidyOutput public_oe property

whether to tidy generated code
public $crudTidyOutput

$crudViewPath public_oe property

namespace path for crud views
public $crudViewPath

$enableI18N public_oe property

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

$extendedModels public_oe property

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

$languageCodeColumn public_oe property

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

$languageTableName public_oe property

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

$modelBaseClass public_oe property

base class for the generated models
public $modelBaseClass

$modelBaseClassSuffix public_oe property

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

$modelBaseTraits public_oe property

traits for base-models
public $modelBaseTraits

$modelDb public_oe property

database application component
public $modelDb

$modelGenerateHintsFromComments public_oe property

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

$modelGenerateLabelsFromComments public_oe property

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

$modelGenerateQuery public_oe property

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

$modelGenerator protected_oe property

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

$modelMessageCategory public_oe property

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

$modelNamespace public_oe property

namespace path for model classes
public $modelNamespace

$modelQueryBaseClass public_oe property

the base class of the new ActiveQuery class
public $modelQueryBaseClass

$modelQueryNamespace public_oe property

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

$modelRemoveDuplicateRelations public_oe property

public $modelRemoveDuplicateRelations

$overwrite public_oe property

whether to generate and overwrite all files
public $overwrite

$singularEntities public_oe property

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

$tableNameMap public_oe property

mapping for table name to model class names
public $tableNameMap

$tablePrefix public_oe property

eg. app_
public $tablePrefix

$tables public_oe property

table names for generating models and CRUDs
public $tables

$template public_oe property

the generator template name
public $template

$useTimestampBehavior public_oe property

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

$useTranslatableBehavior public_oe property

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