From f31467112ad4de3187bb8978e7c2d49e808b991f Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sun, 24 Aug 2014 20:03:01 +0200 Subject: [PATCH] RoutingPanel: removed $this from templates --- src/Bridges/ApplicationTracy/RoutingPanel.php | 5 +++++ .../templates/RoutingPanel.panel.phtml | 12 ++++++------ .../templates/RoutingPanel.tab.phtml | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Bridges/ApplicationTracy/RoutingPanel.php b/src/Bridges/ApplicationTracy/RoutingPanel.php index 6cc800500..1896aed28 100644 --- a/src/Bridges/ApplicationTracy/RoutingPanel.php +++ b/src/Bridges/ApplicationTracy/RoutingPanel.php @@ -67,6 +67,7 @@ public function getTab() { $this->analyse($this->router); ob_start(); + $request = $this->request; require __DIR__ . '/templates/RoutingPanel.tab.phtml'; return ob_get_clean(); } @@ -79,6 +80,10 @@ public function getTab() public function getPanel() { ob_start(); + $request = $this->request; + $routers = $this->routers; + $source = $this->source; + $url = $this->httpRequest->getUrl(); require __DIR__ . '/templates/RoutingPanel.panel.phtml'; return ob_get_clean(); } diff --git a/src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml b/src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml index 59cf40d9e..2293b5cfb 100644 --- a/src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml +++ b/src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml @@ -34,17 +34,17 @@ use Nette,

-request)): ?> + no route - request->getPresenterName() . ':' . (isset($this->request->parameters[Presenter::ACTION_KEY]) ? $this->request->parameters[Presenter::ACTION_KEY] : Presenter::DEFAULT_ACTION) . (isset($this->request->parameters[Presenter::SIGNAL_KEY]) ? " {$this->request->parameters[Presenter::SIGNAL_KEY]}!" : '')) ?> + getPresenterName() . ':' . (isset($request->parameters[Presenter::ACTION_KEY]) ? $request->parameters[Presenter::ACTION_KEY] : Presenter::DEFAULT_ACTION) . (isset($request->parameters[Presenter::SIGNAL_KEY]) ? " {$request->parameters[Presenter::SIGNAL_KEY]}!" : '')) ?>

-

httpRequest->getUrl()) ?>

+

-routers)): ?> +

No routers defined.

@@ -61,7 +61,7 @@ use Nette, - routers as $router): ?> + @@ -91,6 +91,6 @@ use Nette, - source): ?>

source ?> in source->getFileName(), $this->source->getStartLine()) ?>

+

in getFileName(), $source->getStartLine()) ?>

diff --git a/src/Bridges/ApplicationTracy/templates/RoutingPanel.tab.phtml b/src/Bridges/ApplicationTracy/templates/RoutingPanel.tab.phtml index 4fc75a356..b4fb8f5c6 100644 --- a/src/Bridges/ApplicationTracy/templates/RoutingPanel.tab.phtml +++ b/src/Bridges/ApplicationTracy/templates/RoutingPanel.tab.phtml @@ -7,4 +7,4 @@ use Nette, ?> request)): ?>no routerequest->getPresenterName() . ':' . (isset($this->request->parameters[Presenter::ACTION_KEY]) ? $this->request->parameters[Presenter::ACTION_KEY] : Presenter::DEFAULT_ACTION) . (isset($this->request->parameters[Presenter::SIGNAL_KEY]) ? " {$this->request->parameters[Presenter::SIGNAL_KEY]}!" : '')); endif ?> +/>no routegetPresenterName() . ':' . (isset($request->parameters[Presenter::ACTION_KEY]) ? $request->parameters[Presenter::ACTION_KEY] : Presenter::DEFAULT_ACTION) . (isset($request->parameters[Presenter::SIGNAL_KEY]) ? " {$request->parameters[Presenter::SIGNAL_KEY]}!" : '')); endif ?>