mongodb\gii\model\Generator validateCollectionName()

validateCollectionName() public method Validates the $collectionName attribute. public void validateCollectionName ( )

mongodb\gii\model\Generator rules()

rules() public method Returns the validation rules for attributes. Validation rules are used by validate() to check if attribute values are valid. Child classes may override this method to declare different validation rules. Each rule is an array with the following structure: [ ['attribute1', 'attribute2'], 'validator type', 'on' => ['scenario1', 'scenario2'], //...other parameters... ] where attribute list: required, specifies the attributes array to be validated, for s

mongodb\gii\model\Generator getDbConnection()

getDbConnection() protected method protected yii\mongodb\Connection getDbConnection ( )return yii\mongodb\Connection The DB connection as specified by $db.

mongodb\gii\model\Generator getDescription()

getDescription() public method public string getDescription ( )return string The detailed description of the generator.

mongodb\gii\model\Generator getName()

getName() public method public string getName ( )return string Name of the code generator

mongodb\gii\model\Generator hints()

hints() public method Returns the list of hint messages. The array keys are the attribute names, and the array values are the corresponding hint messages. Hint messages will be displayed to end users when they are filling the form for the generator. public array hints ( )return array The list of hint messages

mongodb\gii\model\Generator generate()

generate() public method Generates the code based on the current user input and the specified code template files. This is the main method that child classes should implement. Please refer to yii\gii\generators\controller\Generator::generate() as an example on how to implement this method. public yii\gii\CodeFile[] generate ( )return yii\gii\CodeFile[] A list of code files to be created.

mongodb\gii\model\Generator generateLabels()

generateLabels() public method Generates the attribute labels for the specified attributes list. public array generateLabels ( $attributes )$attributes array The list of attributes return array The generated attribute labels (name => label)

mongodb\gii\model\Generator generateRules()

generateRules() public method Generates validation rules for the specified collection. public array generateRules ( $attributes )$attributes array The list of attributes return array The generated validation rules

mongodb\gii\model\Generator generateClassName()

generateClassName() protected method Generates a class name from the specified collection name. protected string generateClassName ( $collectionName )$collectionName string The collection name (which may contain schema prefix) return string The generated class name