Class schmunk42\giiant\generators\crud\Generator

Inheritanceschmunk42\giiant\generators\crud\Generator » yii\gii\generators\crud\Generator
Available since version1.0

This generator generates an extended version of CRUDs.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$accessFilter bool Whether to add an access filter to controllers schmunk42\giiant\generators\crud\Generator
$actionButtonClass string schmunk42\giiant\generators\crud\Generator
$controllerNs \schmunk42\giiant\generators\crud\sting Controller base namespace schmunk42\giiant\generators\crud\Generator
$formLayout string Bootstrap CSS-class for form-layout schmunk42\giiant\generators\crud\Generator
$generateControllerClass bool Whether to overwrite extended controller classes schmunk42\giiant\generators\crud\Generator
$gridMaxColumns int Maximum number of columns to show in grid schmunk42\giiant\generators\crud\Generator
$gridRelationMaxColumns int Maximum number of columns to show in grid schmunk42\giiant\generators\crud\Generator
$messageCatalog string Translation catalogue schmunk42\giiant\generators\crud\Generator
$pathPrefix string Prefix for controller route, eg. schmunk42\giiant\generators\crud\Generator
$providerList null Comma separated list of provider classes schmunk42\giiant\generators\crud\Generator
$requires array Array of composer packages (only to show information to the developer in the web UI) schmunk42\giiant\generators\crud\Generator
$singularEntities bool Whether to convert controller name to singular schmunk42\giiant\generators\crud\Generator
$skipRelations array Relations to be excluded in UI rendering schmunk42\giiant\generators\crud\Generator
$tablePrefix string Table prefix to be removed from class names when auto-detecting model names, eg. schmunk42\giiant\generators\crud\Generator
$viewPath string Default view path schmunk42\giiant\generators\crud\Generator

Public Methods

Hide inherited methods

MethodDescriptionDefined By
activeField() Generates code for active field by using the provider queue schmunk42\giiant\generators\crud\Generator
appendActiveField() schmunk42\giiant\generators\crud\Generator
attributeFormat() schmunk42\giiant\generators\crud\Generator
columnFormat() schmunk42\giiant\generators\crud\Generator
createRelationRoute() schmunk42\giiant\generators\crud\Generator
generate() schmunk42\giiant\generators\crud\Generator
generateActionParamComments() schmunk42\giiant\generators\crud\Generator
generateActionParams() schmunk42\giiant\generators\crud\Generator
generateProviderCheckboxListData() schmunk42\giiant\generators\crud\Generator
generateRelationTo() schmunk42\giiant\generators\crud\Generator
generateUrlParams() Generates URL parameters schmunk42\giiant\generators\crud\Generator
getColumnByAttribute() schmunk42\giiant\generators\crud\Generator
getControllerID() schmunk42\giiant\generators\crud\Generator
getCoreProviders() schmunk42\giiant\generators\crud\Generator
getDescription() schmunk42\giiant\generators\crud\Generator
getModelByTableName() schmunk42\giiant\generators\crud\Generator
getModelNameAttribute() schmunk42\giiant\generators\crud\Generator
getModelRelations() Finds relations of a model class schmunk42\giiant\generators\crud\Generator
getName() schmunk42\giiant\generators\crud\Generator
getRelationByColumn() schmunk42\giiant\generators\crud\Generator
getViewPath() schmunk42\giiant\generators\crud\Generator
hints() schmunk42\giiant\generators\crud\Generator
init() schmunk42\giiant\generators\crud\Generator
isPivotRelation() schmunk42\giiant\generators\crud\Generator
partialView() schmunk42\giiant\generators\crud\Generator
prependActiveField() schmunk42\giiant\generators\crud\Generator
relationGrid() schmunk42\giiant\generators\crud\Generator
rules() schmunk42\giiant\generators\crud\Generator
stickyAttributes() schmunk42\giiant\generators\crud\Generator
successMessage() schmunk42\giiant\generators\crud\Generator
validateClass() schmunk42\giiant\generators\crud\Generator

Property Details

$accessFilter public property

Whether to add an access filter to controllers

public bool $accessFilter false
$actionButtonClass public property
public string $actionButtonClass 'schmunk42\giiant\components\grid\ActionColumn'
$controllerNs public property

Controller base namespace

public \schmunk42\giiant\generators\crud\sting $controllerNs null
$formLayout public property

Bootstrap CSS-class for form-layout

public string $formLayout 'horizontal'
$generateControllerClass public property

Whether to overwrite extended controller classes

public bool $generateControllerClass false
$gridMaxColumns public property

Maximum number of columns to show in grid

public int $gridMaxColumns 8
$gridRelationMaxColumns public property

Maximum number of columns to show in grid

public int $gridRelationMaxColumns 8
$messageCatalog public property

Translation catalogue

public string $messageCatalog 'app'
$pathPrefix public property

Prefix for controller route, eg. when generating controllers into subfolders

public string $pathPrefix null
$providerList public property

Comma separated list of provider classes

public null $providerList null
$requires public property

Array of composer packages (only to show information to the developer in the web UI)

public array $requires = []
$singularEntities public property

Whether to convert controller name to singular

public bool $singularEntities false
$skipRelations public property

Relations to be excluded in UI rendering

public array $skipRelations = []
$tablePrefix public property

Table prefix to be removed from class names when auto-detecting model names, eg. app_ converts table app_foo into Foo

public string $tablePrefix null
$viewPath public property

Default view path

public string $viewPath '@backend/views'

Method Details

activeField() public method

Generates code for active field by using the provider queue

public mixed|string activeField ( $attribute, $model null )
$attribute
$model null
appendActiveField() public method

public void appendActiveField ( $attribute, $model null )
$attribute
$model
attributeFormat() public method

public void attributeFormat ( $attribute, $model null )
$attribute
$model
callProviderQueue() protected method

protected void callProviderQueue ( $func, $args, $generator )
$func
$args
$generator
columnFormat() public method

public void columnFormat ( $attribute, $model null )
$attribute
$model
createRelationRoute() public method

public void createRelationRoute ( $relation, $action )
$relation
$action
generate() public method

public void generate ( )
generateActionParamComments() public method

public void generateActionParamComments ( )
generateActionParams() public method

public void generateActionParams ( )
generateProviderCheckboxListData() public method

public array generateProviderCheckboxListData ( )
return array

List of providers. Keys and values contain the same strings.

generateRelationTo() public method

public void generateRelationTo ( $relation )
$relation
generateUrlParams() public method

Generates URL parameters

public string generateUrlParams ( )
getColumnByAttribute() public method

public void getColumnByAttribute ( $attribute, $model null )
$attribute
$model
getControllerID() public method

public string getControllerID ( )
return string

The controller ID (without the module ID prefix)

getCoreProviders() public static method

public static array getCoreProviders ( )
return array

Class names of the providers declared directly under crud/providers folder.

getDescription() public method

public void getDescription ( )
getModelByTableName() public method

public void getModelByTableName ( $name )
$name
getModelNameAttribute() public method

public void getModelNameAttribute ( $modelClass )
$modelClass
getModelRelations() public method

Finds relations of a model class

return values can be filtered by types 'belongs_to', 'many_many', 'has_many', 'has_one', 'pivot'

public array getModelRelations ( $modelClass, $types = ['belongs_to''many_many''has_many''has_one''pivot'] )
$modelClass \yii\db\ActiveRecord
$types array
getName() public method

public void getName ( )
getRelationByColumn() public method

public null|\yii\db\ActiveQuery getRelationByColumn ( $model, $column )
$model
$column
getViewPath() public method

public string getViewPath ( )
return string

The action view file path

hints() public method

public void hints ( )
init() public method

public void init ( )
initializeProviders() protected method

protected void initializeProviders ( )
isPivotRelation() public method

public void isPivotRelation ( \yii\db\ActiveQuery $relation )
$relation
partialView() public method

public void partialView ( $name, $model null )
$name
$model
prependActiveField() public method

public void prependActiveField ( $attribute, $model null )
$attribute
$model
relationGrid() public method

public void relationGrid ( $name, $relation, $showAllRecords false )
$name
$relation
$showAllRecords
rules() public method

public void rules ( )
shorthandAttributeFormat() protected method

protected void shorthandAttributeFormat ( $attribute, $model )
$attribute
$model
stickyAttributes() public method

public void stickyAttributes ( )
successMessage() public method

public void successMessage ( )
validateClass() public method

public void validateClass ( $attribute, $params )
$attribute
$params