Exemplo n.º 1
0
 /**
  * @return Zend\View\Helper\HeadLink
  */
 public function appendStyles()
 {
     $styles = $this->renderer->getAssets('css');
     $headLink = $this->getView()->headLink();
     foreach ($styles as $style) {
         $headLink->appendStylesheet($style);
     }
     $headLink->appendStylesheet($this->getView()->url('phpdebugbar-custom-resource', ['resource' => $this->customStyle]));
     return $headLink;
 }
Exemplo n.º 2
0
 /**
  * Add the debugger assets to the Grav Assets
  *
  * @return $this
  */
 public function addAssets()
 {
     if ($this->enabled()) {
         /** @var Assets $assets */
         $assets = $this->grav['assets'];
         // Add jquery library
         $assets->add('jquery', 101);
         $this->renderer = $this->debugbar->getJavascriptRenderer();
         $this->renderer->setIncludeVendors(false);
         // Get the required CSS files
         list($css_files, $js_files) = $this->renderer->getAssets(null, JavascriptRenderer::RELATIVE_URL);
         foreach ($css_files as $css) {
             $assets->addCss($css);
         }
         $assets->addCss('/system/assets/debugger.css');
         foreach ($js_files as $js) {
             $assets->addJs($js);
         }
     }
     return $this;
 }