mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-05 23:14:40 +01:00
Merge commit 'beafb99e562bf52f2496d106788160b776243bbd' into feature/toolbar-ui-2
Conflicts: extensions/debug/Module.php
This commit is contained in:
@@ -38,13 +38,11 @@ class Module extends \yii\base\Module
|
||||
*/
|
||||
public $logTarget;
|
||||
/**
|
||||
* @var array|Panel[]
|
||||
* @var array list of debug panels. The array keys are the panel IDs, and values are the corresponding
|
||||
* panel class names or configuration arrays. This will be merged with [[corePanels()]].
|
||||
* You may set a panel to be false to disable a core panel.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
@@ -78,15 +76,7 @@ class Module extends \yii\base\Module
|
||||
Yii::$app->getView()->on(View::EVENT_END_BODY, [$this, 'renderToolbar']);
|
||||
});
|
||||
|
||||
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;
|
||||
}
|
||||
$this->panels = array_filter(ArrayHelper::merge($this->corePanels(), $this->panels));
|
||||
foreach ($this->panels as $id => $config) {
|
||||
$config['module'] = $this;
|
||||
$config['id'] = $id;
|
||||
|
||||
Reference in New Issue
Block a user