Browse Source

Added display of installed extension to debug panel.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
9867ffb6f7
  1. 14
      extensions/debug/panels/ConfigPanel.php

14
extensions/debug/panels/ConfigPanel.php

@ -64,6 +64,7 @@ EOD;
return "<h1>Configuration</h1>\n" return "<h1>Configuration</h1>\n"
. $this->renderData('Application Configuration', $app) . "\n" . $this->renderData('Application Configuration', $app) . "\n"
. $this->renderData('PHP Configuration', $php) . "\n" . $this->renderData('PHP Configuration', $php) . "\n"
. $this->renderExtensions()
. $this->getPhpInfo(); . $this->getPhpInfo();
} }
@ -93,6 +94,18 @@ $rows
EOD; EOD;
} }
protected function renderExtensions()
{
if (empty($this->data['extensions'])) {
return '';
}
$data = [];
foreach ($this->data['extensions'] as $extension) {
$data[$extension['name']] = $data['version'];
}
return $this->renderData('Extensions', $data) . "\n";
}
public function save() public function save()
{ {
return [ return [
@ -110,6 +123,7 @@ EOD;
'apc' => extension_loaded('apc'), 'apc' => extension_loaded('apc'),
'memcache' => extension_loaded('memcache'), 'memcache' => extension_loaded('memcache'),
], ],
'extensions' => Yii::$app->extensions,
]; ];
} }
} }

Loading…
Cancel
Save