Skip to content

Commit

Permalink
v5.0.7 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
JJimmyFlynn committed Feb 28, 2024
1 parent cd9f5ee commit e8d9d96
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "viget/craft-viget-base",
"description": "Viget Base Module",
"type": "yii2-extension",
"version": "5.0.6",
"version": "5.0.7",
"keywords": [
"craft",
"cms",
Expand Down
18 changes: 9 additions & 9 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,35 +35,35 @@ public function bootstrap($app)
{
Craft::setAlias('@viget/base', __DIR__);

self::setInstance($this);

Craft::$app->onInit(function() {
self::setInstance($this);
$this->_loadConfig();
$this->_setComponents();

// Auto-bootstrapping requires that we
// manually register our controller paths
if (Craft::$app instanceof CraftWebApplication) {
Craft::$app->controllerMap['parts-kit'] = [
'class' => PartsKitController::class,
];
}

if (Craft::$app->request->getIsSiteRequest()) {
$this->_bindEvents();

Craft::$app->view->registerTwigExtension(new Extension());
}

if (Craft::$app->request->getIsCpRequest()) {
$this->_bindCpEvents();

// Phone home for Airtable inventory
if (!Craft::$app->request->getIsAjax() && Craft::$app->isInstalled) {
PhoneHome::makeCall();
}
}

// Always turn on the debug bar and field handles in dev environment (for logged in users)
Event::on(
CraftWebApplication::class,
Expand All @@ -84,11 +84,11 @@ static function (Event $event) {
}
}
);

Craft::info(
'viget base loaded',
__METHOD__
);
);
});
}

Expand Down

0 comments on commit e8d9d96

Please sign in to comment.