Revision #5 has been created by OldMehdi on Oct 23, 2015, 9:55:30 AM with the memo:
Fixed Module::bootstrap() to make this tutorial work
« previous (#4) next (#6) »
Changes
Title
unchanged
YII2: Create console commands inside a module or extension
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
yii2, tutorial, config
Content
changed
[...]
(I named it "example_commands" for this instructions)
Generate new module from commandline with gii (or use gii-webinterface)
```php
command> yii gii/module --moduleID=example_commands --moduleClass="app\modules\example_commands\Module
"
Running 'Module Generator'...[...]
{
if ($app instanceof \yii\console\Application) {
$this $app->controller
NamespaceMap[$this->id] = [
'class' =
> 'app\modules\example_commands\commands
'\TestingController',
'module' => $this,
];
}
}
}
[/code]
```[...]