Fixes #5600: Allow configuring debug panels in yii\debug\Module::panels as panel class name strings

This commit is contained in:
Qiang Xue
2014-10-16 09:30:12 -04:00
parent 999e8b84d4
commit 0909e0252a
3 changed files with 5 additions and 1 deletions

View File

@@ -101,6 +101,9 @@ class Module extends \yii\base\Module implements BootstrapInterface
}
foreach ($this->panels as $id => $config) {
if (is_string($config)) {
$config = ['class' => $config];
}
$config['module'] = $this;
$config['id'] = $id;
$this->panels[$id] = Yii::createObject($config);