Commit 7e823f09 by Klimov Paul

Docs about Sphinx Gii generator added

parent b85074a2
...@@ -17,6 +17,7 @@ Yii Framework 2 sphinx extension Change Log ...@@ -17,6 +17,7 @@ Yii Framework 2 sphinx extension Change Log
- Enh #1398: Refactor ActiveRecord to use BaseActiveRecord class of the framework (klimov-paul) - Enh #1398: Refactor ActiveRecord to use BaseActiveRecord class of the framework (klimov-paul)
- Enh #2002: Added filterWhere() method to yii\spinx\Query to allow easy addition of search filter conditions by ignoring empty search fields (samdark, cebe) - Enh #2002: Added filterWhere() method to yii\spinx\Query to allow easy addition of search filter conditions by ignoring empty search fields (samdark, cebe)
- Enh #2892: ActiveRecord dirty attributes are now reset after call to `afterSave()` so information about changed attributes is available in `afterSave`-event (cebe) - Enh #2892: ActiveRecord dirty attributes are now reset after call to `afterSave()` so information about changed attributes is available in `afterSave`-event (cebe)
- Enh #3964: Gii generator for Active Record model added (klimov-paul)
- Chg #2281: Renamed `ActiveRecord::create()` to `populateRecord()` and changed signature. This method will not call instantiate() anymore (cebe) - Chg #2281: Renamed `ActiveRecord::create()` to `populateRecord()` and changed signature. This method will not call instantiate() anymore (cebe)
- Chg #2146: Removed `ActiveRelation` class and moved the functionality to `ActiveQuery`. - Chg #2146: Removed `ActiveRelation` class and moved the functionality to `ActiveQuery`.
All relational queries are now directly served by `ActiveQuery` allowing to use All relational queries are now directly served by `ActiveQuery` allowing to use
......
...@@ -243,3 +243,27 @@ foreach ($articles as $article) { ...@@ -243,3 +243,27 @@ foreach ($articles as $article) {
echo $article->snippet; echo $article->snippet;
} }
``` ```
Using Gii generator
-------------------
This extension provides a code generator, which can be integrated with yii 'gii' module. It allows generation of the
Active Record code. In order to enable it, you should adjust your application configuration in following way:
```php
return [
//....
'modules' => [
// ...
'gii' => [
'class' => 'yii\gii\Module',
'generators' => [
'sphinxModel' => [
'class' => 'yii\sphinx\gii\model\Generator'
]
],
],
]
];
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment