Commit d4c3c356 by Tobias Munk

added panels position

parent a872d605
......@@ -42,6 +42,10 @@ class Module extends \yii\base\Module
*/
public $panels = [];
/**
* @var string postion of the custom configured panels 'begin' or 'end'
*/
public $panelsPosition = 'end';
/**
* @var string the directory storing the debugger data files. This can be specified using a path alias.
*/
public $dataPath = '@runtime/debug';
......@@ -64,7 +68,15 @@ class Module extends \yii\base\Module
Yii::$app->getView()->on(View::EVENT_END_BODY, [$this, 'renderToolbar']);
});
$this->panels = ArrayHelper::merge($this->corePanels(), $this->panels);
switch ($this->panelsPosition) {
case 'begin':
$this->panels = ArrayHelper::merge($this->panels, $this->corePanels());
break;
case 'end':
default:
$this->panels = ArrayHelper::merge($this->corePanels(), $this->panels);
break;
}
foreach ($this->panels as $id => $config) {
$config['module'] = $this;
$config['id'] = $id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment