Class yii\mongodb\gii\model\Generator
Inheritance | yii\mongodb\gii\model\Generator » yii\gii\Generator |
---|---|
Available since version | 2.0 |
This generator will generate ActiveRecord class for the specified MongoDB collection.
Public Properties
Public Methods
Protected Methods
Method | Description | Defined By |
---|---|---|
generateClassName() | Generates a class name from the specified collection name. | yii\mongodb\gii\model\Generator |
getDbConnection() | yii\mongodb\gii\model\Generator |
Property Details
Method Details
public void attributeLabels ( ) |
public void autoCompleteData ( ) |
public void generate ( ) |
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 |
---|
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) |
---|
Generates validation rules for the specified collection.
public array generateRules ( $attributes ) | ||
$attributes | array | The list of attributes |
return | array | The generated validation rules |
---|
protected yii\mongodb\Connection getDbConnection ( ) | ||
return | yii\mongodb\Connection | The DB connection as specified by $db. |
---|
public void getDescription ( ) |
public void getName ( ) |
public void hints ( ) |
public void requiredTemplates ( ) |
public void rules ( ) |
public void stickyAttributes ( ) |
Validates the $collectionName attribute.
public void validateCollectionName ( ) |
Validates the $db attribute.
public void validateDb ( ) |
Validates the $modelClass attribute.
public void validateModelClass ( ) |
Validates the $ns attribute.
public void validateNamespace ( ) |