Last active
October 29, 2023 10:15
-
-
Save lisotton/8209d9a019d8fa7686baad87c3d1cc65 to your computer and use it in GitHub Desktop.
Yii2 Debug bar using external assets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- src/Module.php | |
+++ src/Module.php | |
@@ -354,7 +354,25 @@ | |
*/ | |
protected function resetGlobalSettings() | |
{ | |
- Yii::$app->assetManager->bundles = []; | |
+ Yii::$app->assetManager->bundles = [ | |
+ 'yii\web\JqueryAsset' => [ | |
+ 'js' => ['https://cdn.jsdelivr.net/npm/jquery@2.2.4/dist/jquery.min.js'], | |
+ 'jsOptions' => ['type' => 'text/javascript'], | |
+ 'sourcePath' => NULL, | |
+ ], | |
+ 'yii\bootstrap\BootstrapAsset' => [ | |
+ 'sourcePath' => NULL, | |
+ 'css' => ['https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css'], | |
+ ], | |
+ 'yii\bootstrap\BootstrapPluginAsset' => [ | |
+ 'js' => ['https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js'], | |
+ 'sourcePath' => NULL, | |
+ ], | |
+ 'yii\widgets\PjaxAsset' => [ | |
+ 'js' => ['https://cdn.jsdelivr.net/gh/yiisoft/jquery-pjax@master/jquery.pjax.js'], | |
+ 'sourcePath' => NULL, | |
+ ], | |
+ ]; | |
} | |
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment