gii\Generator validateTemplate()

validateTemplate() public method Validates the template selection. This method validates whether the user selects an existing template and the template contains all required template files as specified in requiredTemplates(). public void validateTemplate ( )

gii\Generator validateNewClass()

validateNewClass() public method An inline validator that checks if the attribute value refers to a valid namespaced class name. The validator will check if the directory containing the new class file exist or not. public void validateNewClass ( $attribute, $params )$attribute string The attribute being validated $params array The validation options

gii\Generator validateMessageCategory()

validateMessageCategory() public method Checks if message category is not empty when I18N is enabled. public void validateMessageCategory ( )

gii\Generator validateClass()

validateClass() public method An inline validator that checks if the attribute value refers to an existing class name. If the extends option is specified, it will also check if the class is a child class of the class represented by the extends option. public void validateClass ( $attribute, $params )$attribute string The attribute being validated $params array The validation options

gii\Generator successMessage()

successMessage() public method Returns the message to be displayed when the newly generated code is saved successfully. Child classes may override this method to customize the message. public string successMessage ( )return string The message to be displayed when the newly generated code is saved successfully.

gii\Generator stickyAttributes()

stickyAttributes() public method Returns the list of sticky attributes. A sticky attribute will remember its value and will initialize the attribute with this value when the generator is restarted. public array stickyAttributes ( )return array List of sticky attributes

gii\Generator saveStickyAttributes()

saveStickyAttributes() public method Saves sticky attributes into an internal file. public void saveStickyAttributes ( )

gii\Generator save()

save() public method Saves the generated code into files. public boolean save ( $files, $answers, &$results )$files yii\gii\CodeFile[] The code files to be saved $answers array $results string This parameter receives a value from this method indicating the log messages generated while saving the code files. return boolean Whether files are successfully saved without any error.

gii\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

gii\Generator requiredTemplates()

requiredTemplates() public method Returns a list of code template files that are required. Derived classes usually should override this method if they require the existence of certain template files. public array requiredTemplates ( )return array List of code template files that are required. They should be file paths relative to $templatePath.