PHP Класс schmunk42\giiant\commands\BatchController

Автор: Tobias Munk ([email protected])
Наследование: extends yii\console\Controller
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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)

Свойство Тип Описание
$appConfig application configuration for creating temporary applications
$modelGenerator of class schmunk42\giiant\generators\model\Generator

Открытые методы

Метод Описание
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 )

Защищенные методы

Метод Описание
getYiiConfiguration ( ) : array Returns Yii's initial configuration array.

Приватные методы

Метод Описание
createDirectoryFromNamespace ( $ns ) Helper function to create.

Описание методов

actionCruds() публичный метод

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

actionIndex() публичный метод

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

actionModels() публичный метод

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

beforeAction() публичный метод

Loads application configuration and checks tables parameter.
public beforeAction ( Action $action ) : boolean
$action yii\base\Action
Результат boolean

getYiiConfiguration() защищенный метод

Returns Yii's initial configuration array.
protected getYiiConfiguration ( ) : array
Результат array

options() публичный метод

public options ( $id )

Описание свойств

$appConfig защищенное свойство

application configuration for creating temporary applications
protected $appConfig

$crudAccessFilter публичное свойство

whether to add accessFilter in behavior
public $crudAccessFilter

$crudBaseControllerClass публичное свойство

base class for crud controllers
public $crudBaseControllerClass

$crudBaseTraits публичное свойство

public $crudBaseTraits

$crudControllerNamespace публичное свойство

namespace path for crud controller
public $crudControllerNamespace

$crudFixOutput публичное свойство

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

$crudIndexGridClass публичное свойство

public $crudIndexGridClass

$crudIndexWidgetType публичное свойство

public $crudIndexWidgetType

$crudMessageCategory публичное свойство

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

$crudPathPrefix публичное свойство

route prefix for crud controller actions
public $crudPathPrefix

$crudProviders публичное свойство

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

$crudSearchModelNamespace публичное свойство

namespace path for crud search models
public $crudSearchModelNamespace

$crudSearchModelSuffix публичное свойство

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

$crudSkipRelations публичное свойство

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

$crudTemplate публичное свойство

public $crudTemplate

$crudTidyOutput публичное свойство

whether to tidy generated code
public $crudTidyOutput

$crudViewPath публичное свойство

namespace path for crud views
public $crudViewPath

$enableI18N публичное свойство

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

$extendedModels публичное свойство

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

$languageCodeColumn публичное свойство

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

$languageTableName публичное свойство

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

$modelBaseClass публичное свойство

base class for the generated models
public $modelBaseClass

$modelBaseClassSuffix публичное свойство

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

$modelBaseTraits публичное свойство

traits for base-models
public $modelBaseTraits

$modelDb публичное свойство

database application component
public $modelDb

$modelGenerateHintsFromComments публичное свойство

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

$modelGenerateLabelsFromComments публичное свойство

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

$modelGenerateQuery публичное свойство

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

$modelGenerator защищенное свойство

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

$modelMessageCategory публичное свойство

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

$modelNamespace публичное свойство

namespace path for model classes
public $modelNamespace

$modelQueryBaseClass публичное свойство

the base class of the new ActiveQuery class
public $modelQueryBaseClass

$modelQueryNamespace публичное свойство

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

$modelRemoveDuplicateRelations публичное свойство

public $modelRemoveDuplicateRelations

$overwrite публичное свойство

whether to generate and overwrite all files
public $overwrite

$singularEntities публичное свойство

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

$tableNameMap публичное свойство

mapping for table name to model class names
public $tableNameMap

$tablePrefix публичное свойство

eg. app_
public $tablePrefix

$tables публичное свойство

table names for generating models and CRUDs
public $tables

$template публичное свойство

the generator template name
public $template

$useTimestampBehavior публичное свойство

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

$useTranslatableBehavior публичное свойство

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