| 12345 |
anikendra |
1 |
<?php
|
|
|
2 |
/**
|
|
|
3 |
* Toolbar history state view.
|
|
|
4 |
*
|
|
|
5 |
* PHP 5
|
|
|
6 |
*
|
|
|
7 |
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
|
|
8 |
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
|
|
9 |
*
|
|
|
10 |
* Licensed under The MIT License
|
|
|
11 |
* Redistributions of files must retain the above copyright notice.
|
|
|
12 |
*
|
|
|
13 |
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
|
|
14 |
* @link http://cakephp.org CakePHP(tm) Project
|
|
|
15 |
* @since DebugKit 1.0
|
|
|
16 |
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
|
|
17 |
*/
|
|
|
18 |
|
|
|
19 |
$panels = array();
|
|
|
20 |
foreach ($toolbarState as $panelName => $panel) {
|
|
|
21 |
if (!empty($panel) && !empty($panel['elementName'])) {
|
|
|
22 |
$panels[$panelName] = $this->element($panel['elementName'], array(
|
|
|
23 |
'content' => $panel['content']
|
|
|
24 |
), array(
|
|
|
25 |
'plugin' => Inflector::camelize($panel['plugin'])
|
|
|
26 |
));
|
|
|
27 |
}
|
|
|
28 |
}
|
|
|
29 |
echo json_encode($panels);
|
|
|
30 |
Configure::write('debug', 0);
|