schmunk42\giiant\Bootstrap::bootstrap PHP Method

bootstrap() public method

Bootstrap method to be called during application bootstrap stage.
public bootstrap ( Application $app )
$app yii\base\Application the application currently running
    public function bootstrap($app)
    {
        if ($app->hasModule('gii')) {
            if (!isset($app->getModule('gii')->generators['giiant-model'])) {
                $app->getModule('gii')->generators['giiant-model'] = 'schmunk42\\giiant\\generators\\model\\Generator';
            }
            if (!isset($app->getModule('gii')->generators['giiant-extension'])) {
                $app->getModule('gii')->generators['giiant-extension'] = 'schmunk42\\giiant\\generators\\extension\\Generator';
            }
            if (!isset($app->getModule('gii')->generators['giiant-crud'])) {
                $app->getModule('gii')->generators['giiant-crud'] = ['class' => 'schmunk42\\giiant\\generators\\crud\\Generator', 'templates' => ['editable' => __DIR__ . '/generators/crud/editable']];
            }
            if (!isset($app->getModule('gii')->generators['giiant-module'])) {
                $app->getModule('gii')->generators['giiant-module'] = 'schmunk42\\giiant\\generators\\module\\Generator';
            }
            if (!isset($app->getModule('gii')->generators['giiant-test'])) {
                $app->getModule('gii')->generators['giiant-test'] = 'schmunk42\\giiant\\generators\\test\\Generator';
            }
            if ($app instanceof \yii\console\Application) {
                $app->controllerMap['giiant-batch'] = 'schmunk42\\giiant\\commands\\BatchController';
            }
        }
    }
Bootstrap