public function onResponse(FilterResponseEvent $event)
    {
        $kernel   = $event->getKernel();
        $response = $event->getResponse();
        $content  = $response->getContent();

        foreach ($this->toolbar->getExtensions() as $extension) {
            $extension->buildData();
        }

        if (false !== strpos($content, '</body>')) {
            $debug = $this->engine->render('TridentDebugModule:Toolbar:toolbar.html.twig', [
                'extensions' => $this->toolbar->getExtensions()
            ]);

            $content = str_replace('</body>', $debug.PHP_EOL.'</body>', $content);

            $response->setContent($content);
        }
    }