PHP Class mootensai\enhancedgii\model\Generator

Since: 2.0
Author: Qiang Xue ([email protected])
Inheritance: extends yii\gii\Generator
Show file Open project: mootensai/yii2-enhanced-gii

Public Properties

Property Type Description
$UUIDColumn
$blameableValue
$createdAt
$createdBy
$deletedAt
$deletedBy
$generateAttributeHints
$generateBaseOnly
$generateLabelsFromComments
$generateMigrations
$generateQuery
$generateRelations
$hiddenColumns
$isTree
$nameAttribute
$nsModel * @var $tableSchema TableSchema
$optimisticLock
$queryBaseClass
$queryClass
$queryNs
$skippedColumns
$timestampValue
$updatedAt
$updatedBy
$useTablePrefix

Public Methods

Method Description
attributeLabels ( )
generate ( )
generateLabels ( yii\db\TableSchema $table ) : array Generates the attribute labels for the specified table.
generateRules ( yii\db\TableSchema $table ) : array Generates validation rules for the specified table.
getDescription ( )
getName ( )
hints ( )
requiredTemplates ( )
rules ( )
stickyAttributes ( )

Protected Methods

Method Description
generateQueryClassName ( string $modelClassName ) : string Generates a query class name from the specified model class name.
isColumnAutoIncremental ( yii\db\TableSchema $table, array $columns ) : boolean Checks if any of the specified columns is auto incremental.

Method Details

attributeLabels() public method

public attributeLabels ( )

generate() public method

public generate ( )

generateLabels() public method

Generates the attribute labels for the specified table.
public generateLabels ( yii\db\TableSchema $table ) : array
$table yii\db\TableSchema the table schema
return array the generated attribute labels (name => label)

generateQueryClassName() protected method

Generates a query class name from the specified model class name.
protected generateQueryClassName ( string $modelClassName ) : string
$modelClassName string model class name
return string generated class name

generateRules() public method

Generates validation rules for the specified table.
public generateRules ( yii\db\TableSchema $table ) : array
$table yii\db\TableSchema the table schema
return array the generated validation rules

getDescription() public method

public getDescription ( )

getName() public method

public getName ( )

hints() public method

public hints ( )

isColumnAutoIncremental() protected method

Checks if any of the specified columns is auto incremental.
protected isColumnAutoIncremental ( yii\db\TableSchema $table, array $columns ) : boolean
$table yii\db\TableSchema the table schema
$columns array columns to check for autoIncrement property
return boolean whether any of the specified columns is auto incremental.

requiredTemplates() public method

public requiredTemplates ( )

rules() public method

public rules ( )

stickyAttributes() public method

public stickyAttributes ( )

Property Details

$UUIDColumn public property

public $UUIDColumn

$blameableValue public property

public $blameableValue

$createdAt public property

public $createdAt

$createdBy public property

public $createdBy

$deletedAt public property

public $deletedAt

$deletedBy public property

public $deletedBy

$generateAttributeHints public property

public $generateAttributeHints

$generateBaseOnly public property

public $generateBaseOnly

$generateLabelsFromComments public property

public $generateLabelsFromComments

$generateMigrations public property

public $generateMigrations

$generateQuery public property

public $generateQuery

$generateRelations public property

public $generateRelations

$hiddenColumns public property

public $hiddenColumns

$isTree public property

public $isTree

$nameAttribute public property

public $nameAttribute

$nsModel public property

* @var $tableSchema TableSchema
public $nsModel

$optimisticLock public property

public $optimisticLock

$queryBaseClass public property

public $queryBaseClass

$queryClass public property

public $queryClass

$queryNs public property

public $queryNs

$skippedColumns public property

public $skippedColumns

$timestampValue public property

public $timestampValue

$updatedAt public property

public $updatedAt

$updatedBy public property

public $updatedBy

$useTablePrefix public property

public $useTablePrefix