Class schmunk42\giiant\generators\crud\Generator
Inheritance | schmunk42\giiant\generators\crud\Generator » yii\gii\generators\crud\Generator |
---|---|
Available since version | 1.0 |
This generator generates an extended version of CRUDs.
Public Properties
Public Methods
Protected Methods
Property Details
Whether to add an access filter to controllers
Controller base namespace
Bootstrap CSS-class for form-layout
Whether to overwrite extended controller classes
Maximum number of columns to show in grid
Maximum number of columns to show in grid
Translation catalogue
Prefix for controller route, eg. when generating controllers into subfolders
Comma separated list of provider classes
Array of composer packages (only to show information to the developer in the web UI)
Whether to convert controller name to singular
Relations to be excluded in UI rendering
Table prefix to be removed from class names when auto-detecting model names, eg. app_
converts table app_foo
into Foo
Default view path
Method Details
Generates code for active field by using the provider queue
public mixed|string activeField ( $attribute, $model = null ) | ||
$attribute | ||
$model | null |
public void appendActiveField ( $attribute, $model = null ) | ||
$attribute | ||
$model |
public void attributeFormat ( $attribute, $model = null ) | ||
$attribute | ||
$model |
protected void callProviderQueue ( $func, $args, $generator ) | ||
$func | ||
$args | ||
$generator |
public void columnFormat ( $attribute, $model = null ) | ||
$attribute | ||
$model |
public void createRelationRoute ( $relation, $action ) | ||
$relation | ||
$action |
public void generate ( ) |
public void generateActionParamComments ( ) |
public void generateActionParams ( ) |
public array generateProviderCheckboxListData ( ) | ||
return | array | List of providers. Keys and values contain the same strings. |
---|
public void generateRelationTo ( $relation ) | ||
$relation |
Generates URL parameters
public string generateUrlParams ( ) |
public void getColumnByAttribute ( $attribute, $model = null ) | ||
$attribute | ||
$model |
public string getControllerID ( ) | ||
return | string | The controller ID (without the module ID prefix) |
---|
public static array getCoreProviders ( ) | ||
return | array | Class names of the providers declared directly under crud/providers folder. |
---|
public void getDescription ( ) |
public void getModelByTableName ( $name ) | ||
$name |
public void getModelNameAttribute ( $modelClass ) | ||
$modelClass |
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 |
public void getName ( ) |
public null|\yii\db\ActiveQuery getRelationByColumn ( $model, $column ) | ||
$model | ||
$column |
public string getViewPath ( ) | ||
return | string | The action view file path |
---|
public void hints ( ) |
public void init ( ) |
protected void initializeProviders ( ) |
public void isPivotRelation ( \yii\db\ActiveQuery $relation ) | ||
$relation |
public void partialView ( $name, $model = null ) | ||
$name | ||
$model |
public void prependActiveField ( $attribute, $model = null ) | ||
$attribute | ||
$model |
public void relationGrid ( $name, $relation, $showAllRecords = false ) | ||
$name | ||
$relation | ||
$showAllRecords |
public void rules ( ) |
protected void shorthandAttributeFormat ( $attribute, $model ) | ||
$attribute | ||
$model |
public void stickyAttributes ( ) |
public void successMessage ( ) |
public void validateClass ( $attribute, $params ) | ||
$attribute | ||
$params |