Difference between #4 and #5 of
YII2: Create console commands inside a module or extension

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->controllerNamespaceMap[$this->id] = [
 
                'class'
=> 'app\modules\example_commands\commands'\TestingController',
 
                'module' => $this,
 
            ]
;
}
}
}
[/code]
```
[...]
8 0
6 followers
Viewed: 64 155 times
Version: 2.0
Category: Tutorials
Written by: MetaCrawler
Last updated by: Luis Armando
Created on: Aug 6, 2015
Last updated: 5 years ago
Update Article

Revisions

View all history