gii\Generator generate()

generate() public abstract 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 abstract yii\gii\CodeFile[] generate ( )return yii\gii\CodeFile[] A list of code files to be created.

gii\Generator formView()

formView() public method Returns the view file for the input form of the generator. The default implementation will return the "form.php" file under the directory that contains the generator class file. public string formView ( )return string The view file for the input form of the generator.

gii\Generator defaultTemplate()

defaultTemplate() public method Returns the root path to the default code template files. The default implementation will return the "templates" subdirectory of the directory containing the generator class file. public string defaultTemplate ( )return string The root path to the default code template files.

gii\Generator autoCompleteData()

autoCompleteData() public method Returns the list of auto complete values. The array keys are the attribute names, and the array values are the corresponding auto complete values. Auto complete values can also be callable typed in order one want to make postponed data generation. public array autoCompleteData ( )return array The list of auto complete values

gii\Generator attributeLabels()

attributeLabels() public method Returns the attribute labels. Attribute labels are mainly used for display purpose. For example, given an attribute firstName, we can declare a label First Name which is more user-friendly and can be displayed to end users. By default an attribute label is generated using generateAttributeLabel(). This method allows you to explicitly specify attribute labels. Note, in order to inherit labels defined in the parent class, a child class needs to merge the parent

gii\Generator $templates

$templates public property A list of available code templates. The array keys are the template names, and the array values are the corresponding template paths or path aliases. public array $templates = []

gii\Generator $templatePath

$templatePath public read-only property The root path of the template files that are currently being used. public string getTemplatePath ( )

gii\Generator $template

$template public property The name of the code template that the user has selected. The value of this property is internally managed by this class. public string $template = 'default'

gii\Generator $stickyDataFile

$stickyDataFile public read-only property The file path that stores the sticky attribute values. public string getStickyDataFile ( )

gii\Generator $name

$name public read-only property Name of the code generator public abstract string getName ( )