-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBootstrap.php
45 lines (39 loc) · 1.48 KB
/
Bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* @link http://neamlabs.com/
* @copyright Copyright (c) 2015 Neam AB
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace neam\gii2_workflow_ui_generators;
use yii\base\Application;
use yii\base\BootstrapInterface;
/**
* Class Bootstrap
* @package neam\gii2_workflow_ui_generators
* @author Fredrik Wollsén <[email protected]>
* @author Tobias Munk <[email protected]>
*/
class Bootstrap implements BootstrapInterface
{
/**
* Bootstrap method to be called during application bootstrap stage.
*
* @param Application $app the application currently running
*/
public function bootstrap($app)
{
if ($app->hasModule('gii')) {
if (!isset($app->getModule('gii')->generators['workflow-ui-yii1-crud'])) {
$app->getModule('gii')->generators['workflow-ui-yii1-crud'] = 'neam\gii2_workflow_ui_generators\yii1_crud\Generator';
}
if (!isset($app->getModule('gii')->generators['workflow-ui-yii1-tests'])) {
$app->getModule('gii')->generators['workflow-ui-yii1-tests'] = 'neam\gii2_workflow_ui_generators\yii1_tests\Generator';
}
if (!isset($app->getModule('gii')->generators['workflow-ui-angular-crud'])) {
$app->getModule('gii')->generators['workflow-ui-angular-crud'] = 'neam\gii2_workflow_ui_generators\angular_crud\Generator';
}
}
}
}