Base for a static organization website

history_state.ctp 932B

123456789101112131415161718192021222324252627282930
  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. $panels = array();
  19. foreach ($toolbarState as $panelName => $panel) {
  20. if (!empty($panel) && !empty($panel['elementName'])) {
  21. $panels[$panelName] = $this->element($panel['elementName'], array(
  22. 'content' => $panel['content']
  23. ), array(
  24. 'plugin' => Inflector::camelize($panel['plugin'])
  25. ));
  26. }
  27. }
  28. echo json_encode($panels);
  29. Configure::write('debug', 0);