Guest User

Untitled

a guest
Jun 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. 'bootstrap' => ['debug'],
  2. 'modules' => [
  3. 'debug' => [
  4. 'class' => 'yii\debug\Module',
  5. 'panels' => [
  6. 'elasticsearch' => [
  7. 'class' => 'my\namespace\DebugPanel',
  8. ],
  9. ],
  10. ],
  11. ],
  12.  
  13. <?php
  14.  
  15. namespace mynamespace;
  16.  
  17. use craftbasePlugin;
  18. use craftwebApplication;
  19.  
  20. class MyPlugin extends Plugin
  21. {
  22. public function init()
  23. {
  24. Event::on(
  25. Application::class,
  26. Application::EVENT_BEFORE_REQUEST,
  27. function() {
  28. /** @var yiidebugModule */
  29. $debugModule = Craft::$app->getModule('debug');
  30.  
  31. $debugModule->panels['mycustompanel'] = new DebugPanel(['module' => $debugModule]);
  32. }
  33. );
  34. }
  35. }
Add Comment
Please, Sign In to add comment