Skip to content

Commit

Permalink
[WebProfilerBundle] Made is_ajax available to the view when rendering…
Browse files Browse the repository at this point in the history
… panels
  • Loading branch information
vicb committed Feb 15, 2012
1 parent b80951c commit ed028d5
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -16,6 +16,7 @@
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag;
use Symfony\Component\HttpFoundation\Request;

/**
* ProfilerController.
Expand All @@ -27,11 +28,12 @@ class ProfilerController extends ContainerAware
/**
* Renders a profiler panel for the given token.
*
* @param string $token The profiler token
* @param Request $request The HTTP request
* @param string $token The profiler token
*
* @return Response A Response instance
*/
public function panelAction($token)
public function panelAction(Request $request, $token)
{
$profiler = $this->container->get('profiler');
$profiler->disable();
Expand All @@ -54,6 +56,7 @@ public function panelAction($token)
'panel' => $panel,
'page' => $page,
'templates' => $this->getTemplates($profiler),
'is_ajax' => $request->isXmlHttpRequest(),
));
}

Expand Down

0 comments on commit ed028d5

Please sign in to comment.