메소드 |
설명 |
|
attributeLabels ( ) : array |
Attribute labels. |
|
checkColumns ( $table ) |
*
Check that all database field names conform to PHP variable naming rules
For example mysql allows field name like "2011aa", but PHP does not allow variables like "$model->2011aa" |
|
confirmed ( CCodeFile $file ) : boolean |
Checks to determine whether file should be saved. |
|
generateActiveField ( string $modelClass, string $column ) : string |
Generates an appropriate input field for _form view. |
|
generateActiveLabel ( string $modelClass, string $column ) : string |
Generates an appropriate label for a field of the element. |
|
generateLabels ( CDbTableSchema $table ) : array |
Generates labels for fields of the table. |
|
generateRules ( CDbTableSchema $table ) : array |
Generates rules for the table. |
|
getTableSchema ( $tableName ) |
*
Gets schema for passed tableName |
|
init ( ) |
Runs on object initiation. |
|
prepare ( ) |
*
Run on form submission by preview or generate buttons. Generates the list of files and code |
|
renderResults ( ) : string |
Write results and run migration scripts. |
|
requiredTemplates ( ) : array |
List of templates that must be present. |
|
resetGenerator ( ) |
*
Resets all session variables to allow restart in case of error |
|
resetTimeStamps ( ) |
Reset the time stamps. |
|
rules ( ) |
Validation rules. |
|
save ( ) : boolean |
Saves the generated views code into files
NB Ensure _www has write permissions for elements directory. |
|
successMessage ( ) |
*
Returns a success message |
|
validateBaseClass ( $attribute, array $params ) |
Validation method for base class. |
|
validateElementFields ( $attribute, array $params ) |
Validation method for elementFields. |
|
validateModelClass ( $attribute, array $params ) |
Validation method for model class and associated table. |
|
validateModelPath ( $attribute, array $params ) |
Validation method for model path. |
|
validateTableName ( $attribute, array $params ) |
Validation method for table name and model class. |
|