Extends Gii allowing an update to existing models with phpDocumentor compatible tags.
Please download using ONE of the following methods:
All requirements are automatically downloaded into the correct location when using composer. There is no need to download additional files or set paths to third party files.
Get composer:
curl http://getcomposer.org/installer | php
Install latest release OR development version:
php composer.phar require cornernote/gii-modeldoc-generator:* // latest release php composer.phar require cornernote/gii-modeldoc-generator:dev-master // development version
Add the vendor folder to the aliases in your yii configuration:
return array(
'aliases' => array(
'vendor' => '/path/to/vendor',
),
);
Download the
latest release or
development version and move the
gii-modeldoc-generator folder into your protected/extensions folder.
Add the path to gii-modeldoc-generator to the
generatorPaths in your gii configuration:
return array(
'modules' => array(
'gii' => array(
'class'=>'system.gii.GiiModule',
'generatorPaths' => array(
// use this if you installed with composer
'vendor.cornernote.gii-prefixmodel-generator.gii',
// OR, use this if you downloaded into your extensions folder
//'ext.gii-modeldoc-generator.gii',
),
),
),
);
Ensure you have --- BEGIN ModelDoc --- and
--- END ModelDoc --- in each of your models, for example:
/**
* Your class description that will not be altered by ModelDoc
*
* --- BEGIN ModelDoc ---
*
* this section will be replaced by ModelDoc
*
* --- END ModelDoc ---
*/
class MyModel extends CActiveRecord { ... }
Visit index.php?r=gii, then choose ModelDoc from the menu.
This extension will not create any new model files. You should first create them or generate them with a model generator.