Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'bootstrap' => ['debug'],
- 'modules' => [
- 'debug' => [
- 'class' => 'yii\debug\Module',
- 'panels' => [
- 'elasticsearch' => [
- 'class' => 'my\namespace\DebugPanel',
- ],
- ],
- ],
- ],
- <?php
- namespace mynamespace;
- use craftbasePlugin;
- use craftwebApplication;
- class MyPlugin extends Plugin
- {
- public function init()
- {
- Event::on(
- Application::class,
- Application::EVENT_BEFORE_REQUEST,
- function() {
- /** @var yiidebugModule */
- $debugModule = Craft::$app->getModule('debug');
- $debugModule->panels['mycustompanel'] = new DebugPanel(['module' => $debugModule]);
- }
- );
- }
- }
Add Comment
Please, Sign In to add comment