Example #1
0
 /**
  * @param JavascriptRenderer $renderer
  * @return string
  */
 public function wrapOutput(JavascriptRenderer $renderer)
 {
     ob_start();
     $renderer->dumpCssAssets();
     $css = '<style type="text/css">' . ob_get_contents() . '</style>';
     $css .= '<style type="text/css">' . $this->getCustomDebugBarStyle() . '</style>';
     ob_clean();
     $renderer->dumpJsAssets();
     $js = '<script type="text/javascript">' . ob_get_contents() . '</script>';
     ob_end_clean();
     return $css . $js . $renderer->render();
 }
 /**
  * 
  * @param JavascriptRenderer $renderer
  * @return string
  */
 protected function getAssets(JavascriptRenderer $renderer)
 {
     ob_start();
     echo '<style type="text/css">' . "\n";
     $renderer->dumpCssAssets();
     // Change icon to CI icon, based on https://github.com/bcit-ci/ci-design/blob/master/website/assets/images/ci-logo.png
     echo 'div.phpdebugbar-header, a.phpdebugbar-restore-btn, div.phpdebugbar-openhandler .phpdebugbar-openhandler-header {' . 'background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U' . '29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIRSURBVHjapJQ9TFRBEMdn7zj5iF8JhpwhxkQxxILgRxAKEkNvuAY7C2oTGxpjtLA1hEISKOwMl' . 'HZqLLDRyoSKBo0Up4QQcgXBEAGB2/U3b+cd7+DOxs39d+ftm/nvf2bnnatclOYjJ+erHbKPtdPodfF7kBbXIv8aNwt7csuLTDU/wzFnEFiqBsYNMJ4L0' . 'gPkOBKCuvgQYQ632RtjuwAGmilomACB/c7JC8x2cBic+OSEUOdjKZyMHiJ4GqsTHIBtsCSmrjZCY4I7LhbsLPgD8uB33sl6rl7AURE9EV4tL9eYVXaHB' . 'Rcspt17Kfoo+yHL3foauFotnoILeqLShSBvSGU0IXQyidsa66Dl/hy8SxSoNCpe4uWABSvZL4Jfcvy8PV8Fw3a7yvEMXI81OJRe5I9awWIyIqdRUIRgB' . 'nsC/LB6aEramWe4mfGEAKMXzssZAj3xHHsTkBSIWIDyAaHv7VpVwR5TX9pI3VY4PbkVfAar7JdIb8RKv8XymPVDxvdUqqBiVdfgMrfyBOe32IucVU7bG' . 'zWKWcxN892KNfCyzPozyTtWdhfSV0Tdx15JestFqfxWefxmfbKQKvhK4Gtrqm37HgLe1eP9DbQ+mvIXn5e5WieGyDZJ4D3WtrTPXaZ9Q0ylxLRBmo+C/' . 'Ue4yqWjnoZ1OFeVNsyP2X43gh44rrD1SWuGr3SVERpCkP8ZfwUYAL2WpEUbzbyiAAAAAElFTkSuQmCC") no-repeat scroll 5px 4px #efefef;' . '}' . '.phpdebugbar-widgets-value.phpdebugbar-widgets-warning { color: #f39c12; }';
     echo '</style>' . "\n";
     echo '<script type="text/javascript">' . "\n";
     $renderer->dumpJsAssets();
     echo '</script>' . "\n";
     return str_replace(['PhpDebugbarFontAwesome', 'phpdebugbar-fa'], ['FontAwesome', 'fa'], ob_get_clean());
 }