public function injectAdminBar(Response $response)
    {
        $content = $response->getContent();

        $this->injectHeadContent($content)->injectAdminBarHtml($content);

        // Update the new content and reset the content length
        $response->setContent($content);
        $response->headers->remove('Content-Length');
    }
public function injectAdminBar(Response $response)
    {
        $content = $response->getContent();

        $this->injectHeadContent($content)->injectAdminBarHtml($content);

        // Update the new content and reset the content length
        $response->setContent($content);
        $response->headers->remove('Content-Length');
    }
public function injectAdminBar ( Response $ response ) { $ content = $ response -> getContent ( ) ; $ this -> injectHeadContent ( $ content ) -> injectAdminBarHtml ( $ content ) ; // Update the new content and reset the content length $ response -> setContent ( $ content ) ; $ response -> headers -> remove ( 'Content-Length' ) ; }
Injects the admin bar into the given Response.
@param Response $response
Based on https://github.com/symfony/WebProfilerBundle/blob/master/EventListener/WebDebugToolbarListener.php
Injects the admin bar into the given Response .