/app/cache/prod/twig/41/ac/995f8349c5704e83c3586f44fb40.php
PHP | 340 lines | 273 code | 17 blank | 50 comment | 19 complexity | a664bbc3ade9cd62c822cfb1bf1b5be9 MD5 | raw file
Possible License(s): Apache-2.0, LGPL-3.0, BSD-3-Clause, BSD-2-Clause
- <?php
- /* DoctrineBundle:Collector:db.html.twig */
- class __TwigTemplate_41ac995f8349c5704e83c3586f44fb40 extends Twig_Template
- {
- public function __construct(Twig_Environment $env)
- {
- parent::__construct($env);
- $this->blocks = array(
- 'toolbar' => array($this, 'block_toolbar'),
- 'menu' => array($this, 'block_menu'),
- 'panel' => array($this, 'block_panel'),
- 'queries' => array($this, 'block_queries'),
- );
- }
- protected function doGetParent(array $context)
- {
- return $this->env->resolveTemplate((($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : null), "request"), "isXmlHttpRequest")) ? ("WebProfilerBundle:Profiler:ajax_layout.html.twig") : ("WebProfilerBundle:Profiler:layout.html.twig")));
- }
- protected function doDisplay(array $context, array $blocks = array())
- {
- $this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
- }
- // line 3
- public function block_toolbar($context, array $blocks = array())
- {
- // line 4
- echo " ";
- ob_start();
- // line 5
- echo " <img width=\"20\" height=\"28\" alt=\"Database\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcCAYAAABh2p9gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQRJREFUeNpi/P//PwM1ARMDlcGogZQDlpMnT7pxc3NbA9nhQKxOpL5rQLwJiPeBsI6Ozl+YBOOOHTv+AOllQNwtLS39F2owKYZ/gRq8G4i3ggxEToggWzvc3d2Pk+1lNL4fFAs6ODi8JzdS7mMRVyDVoAMHDsANdAPiOCC+jCQvQKqBQB/BDbwBxK5AHA3E/kB8nKJkA8TMQBwLxaBIKQbi70AvTADSBiSadwFXpCikpKQU8PDwkGTaly9fHFigkaKIJid4584dkiMFFI6jkTJII0WVmpHCAixZQEXWYhDeuXMnyLsVlEQKI45qFBQZ8eRECi4DBaAlDqle/8A48ip6gAADANdQY88Uc0oGAAAAAElFTkSuQmCC\"/>
- <span class=\"sf-toolbar-status";
- // line 6
- if ((50 < $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "querycount"))) {
- echo " sf-toolbar-status-yellow";
- }
- echo "\">";
- echo twig_escape_filter($this->env, $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "querycount"), "html", null, true);
- echo "</span>
- <span class=\"sf-toolbar-info-piece-additional-detail\">in ";
- // line 7
- echo twig_escape_filter($this->env, sprintf("%0.2f", ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "time") * 1000)), "html", null, true);
- echo " ms</span>
- ";
- $context["icon"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
- // line 9
- echo " ";
- ob_start();
- // line 10
- echo " <div class=\"sf-toolbar-info-piece\">
- <b>DB Queries</b>
- <span>";
- // line 12
- echo twig_escape_filter($this->env, $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "querycount"), "html", null, true);
- echo "</span>
- </div>
- <div class=\"sf-toolbar-info-piece\">
- <b>Query time</b>
- <span>";
- // line 16
- echo twig_escape_filter($this->env, sprintf("%0.2f", ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "time") * 1000)), "html", null, true);
- echo " ms</span>
- </div>
- ";
- $context["text"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
- // line 19
- echo " ";
- $this->env->loadTemplate("WebProfilerBundle:Profiler:toolbar_item.html.twig")->display(array_merge($context, array("link" => (isset($context["profiler_url"]) ? $context["profiler_url"] : null))));
- }
- // line 22
- public function block_menu($context, array $blocks = array())
- {
- // line 23
- echo "<span class=\"label\">
- <span class=\"icon\"><img src=\"";
- // line 24
- echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/webprofiler/images/profiler/db.png"), "html", null, true);
- echo "\" alt=\"\" /></span>
- <strong>Doctrine</strong>
- <span class=\"count\">
- <span>";
- // line 27
- echo twig_escape_filter($this->env, $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "querycount"), "html", null, true);
- echo "</span>
- <span>";
- // line 28
- echo twig_escape_filter($this->env, sprintf("%0.0f", ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "time") * 1000)), "html", null, true);
- echo " ms</span>
- </span>
- </span>
- ";
- }
- // line 33
- public function block_panel($context, array $blocks = array())
- {
- // line 34
- echo " ";
- if (("explain" == (isset($context["page"]) ? $context["page"] : null))) {
- // line 35
- echo " ";
- echo $this->env->getExtension('actions')->renderAction("DoctrineBundle:Profiler:explain", array("token" => (isset($context["token"]) ? $context["token"] : null), "panel" => "db", "connectionName" => $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : null), "request"), "query"), "get", array(0 => "connection"), "method"), "query" => $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : null), "request"), "query"), "get", array(0 => "query"), "method")), array());
- // line 41
- echo " ";
- } else {
- // line 42
- echo " ";
- $this->displayBlock("queries", $context, $blocks);
- echo "
- ";
- }
- }
- // line 46
- public function block_queries($context, array $blocks = array())
- {
- // line 47
- echo " <h2>Queries</h2>
- ";
- // line 49
- $context['_parent'] = (array) $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "queries"));
- $context['loop'] = array(
- 'parent' => $context['_parent'],
- 'index0' => 0,
- 'index' => 1,
- 'first' => true,
- );
- if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
- $length = count($context['_seq']);
- $context['loop']['revindex0'] = $length - 1;
- $context['loop']['revindex'] = $length;
- $context['loop']['length'] = $length;
- $context['loop']['last'] = 1 === $length;
- }
- foreach ($context['_seq'] as $context["connection"] => $context["queries"]) {
- // line 50
- echo " <h3>Connection <em>";
- echo twig_escape_filter($this->env, (isset($context["connection"]) ? $context["connection"] : null), "html", null, true);
- echo "</em></h3>
- ";
- // line 51
- if (twig_test_empty((isset($context["queries"]) ? $context["queries"] : null))) {
- // line 52
- echo " <p>
- <em>No queries.</em>
- </p>
- ";
- } else {
- // line 56
- echo " <ul class=\"alt\">
- ";
- // line 57
- $context['_parent'] = (array) $context;
- $context['_seq'] = twig_ensure_traversable((isset($context["queries"]) ? $context["queries"] : null));
- $context['loop'] = array(
- 'parent' => $context['_parent'],
- 'index0' => 0,
- 'index' => 1,
- 'first' => true,
- );
- if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
- $length = count($context['_seq']);
- $context['loop']['revindex0'] = $length - 1;
- $context['loop']['revindex'] = $length;
- $context['loop']['length'] = $length;
- $context['loop']['last'] = 1 === $length;
- }
- foreach ($context['_seq'] as $context["i"] => $context["query"]) {
- // line 58
- echo " <li class=\"";
- echo twig_escape_filter($this->env, twig_cycle(array(0 => "odd", 1 => "even"), (isset($context["i"]) ? $context["i"] : null)), "html", null, true);
- echo "\">
- <div>
- ";
- // line 60
- if ($this->getAttribute((isset($context["query"]) ? $context["query"] : null), "explainable")) {
- // line 61
- echo " <a href=\"";
- echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_profiler", array("panel" => "db", "token" => (isset($context["token"]) ? $context["token"] : null), "page" => "explain", "connection" => (isset($context["connection"]) ? $context["connection"] : null), "query" => (isset($context["i"]) ? $context["i"] : null))), "html", null, true);
- echo "\" onclick=\"return explain(this);\" style=\"text-decoration: none;\" title=\"Explains\" data-target-id=\"explain-";
- echo twig_escape_filter($this->env, (isset($context["i"]) ? $context["i"] : null), "html", null, true);
- echo "-";
- echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["loop"]) ? $context["loop"] : null), "parent"), "loop"), "index"), "html", null, true);
- echo "\" >
- <img alt=\"+\" src=\"";
- // line 62
- echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/framework/images/blue_picto_more.gif"), "html", null, true);
- echo "\" style=\"display: inline;\" />
- <img alt=\"-\" src=\"";
- // line 63
- echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/framework/images/blue_picto_less.gif"), "html", null, true);
- echo "\" style=\"display: none;\" />
- </a>
- ";
- }
- // line 66
- echo " <code>";
- echo twig_escape_filter($this->env, $this->getAttribute((isset($context["query"]) ? $context["query"] : null), "sql"), "html", null, true);
- echo "</code>
- </div>
- <small>
- <strong>Parameters</strong>: ";
- // line 69
- echo twig_escape_filter($this->env, $this->env->getExtension('yaml')->encode($this->getAttribute((isset($context["query"]) ? $context["query"] : null), "params")), "html", null, true);
- echo "<br />
- <strong>Time</strong>: ";
- // line 70
- echo twig_escape_filter($this->env, sprintf("%0.2f", ($this->getAttribute((isset($context["query"]) ? $context["query"] : null), "executionMS") * 1000)), "html", null, true);
- echo " ms
- </small>
- ";
- // line 72
- if ($this->getAttribute((isset($context["query"]) ? $context["query"] : null), "explainable")) {
- // line 73
- echo " <div id=\"explain-";
- echo twig_escape_filter($this->env, (isset($context["i"]) ? $context["i"] : null), "html", null, true);
- echo "-";
- echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["loop"]) ? $context["loop"] : null), "parent"), "loop"), "index"), "html", null, true);
- echo "\" class=\"loading\"></div>
- ";
- }
- // line 75
- echo " </li>
- ";
- ++$context['loop']['index0'];
- ++$context['loop']['index'];
- $context['loop']['first'] = false;
- if (isset($context['loop']['length'])) {
- --$context['loop']['revindex0'];
- --$context['loop']['revindex'];
- $context['loop']['last'] = 0 === $context['loop']['revindex0'];
- }
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['i'], $context['query'], $context['_parent'], $context['loop']);
- $context = array_merge($_parent, array_intersect_key($context, $_parent));
- // line 77
- echo " </ul>
- ";
- }
- // line 79
- echo " ";
- ++$context['loop']['index0'];
- ++$context['loop']['index'];
- $context['loop']['first'] = false;
- if (isset($context['loop']['length'])) {
- --$context['loop']['revindex0'];
- --$context['loop']['revindex'];
- $context['loop']['last'] = 0 === $context['loop']['revindex0'];
- }
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['connection'], $context['queries'], $context['_parent'], $context['loop']);
- $context = array_merge($_parent, array_intersect_key($context, $_parent));
- // line 80
- echo "
- <h2>Database Connections</h2>
- ";
- // line 83
- if ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "connections")) {
- // line 84
- echo " ";
- $this->env->loadTemplate("WebProfilerBundle:Profiler:table.html.twig")->display(array("data" => $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "connections")));
- // line 85
- echo " ";
- } else {
- // line 86
- echo " <p>
- <em>No connections.</em>
- </p>
- ";
- }
- // line 90
- echo "
- <h2>Entity Managers</h2>
- ";
- // line 93
- if ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "managers")) {
- // line 94
- echo " ";
- $this->env->loadTemplate("WebProfilerBundle:Profiler:table.html.twig")->display(array("data" => $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "managers")));
- // line 95
- echo " ";
- } else {
- // line 96
- echo " <p>
- <em>No entity managers.</em>
- </p>
- ";
- }
- // line 100
- echo "
- <script type=\"text/javascript\">//<![CDATA[
- function explain(link) {
- \"use strict\";
- var imgs = link.children,
- target = link.getAttribute('data-target-id');
- Sfjs.toggle(target, imgs[0], imgs[1])
- .load(
- target,
- link.href,
- null,
- function(xhr, el) {
- el.innerHTML = 'An error occurred while loading the details';
- Sfjs.removeClass(el, 'loading');
- }
- );
- return false;
- }
- //]]></script>
- ";
- }
- public function getTemplateName()
- {
- return "DoctrineBundle:Collector:db.html.twig";
- }
- public function isTraitable()
- {
- return false;
- }
- public function getDebugInfo()
- {
- return array ( 299 => 100, 293 => 96, 290 => 95, 287 => 94, 285 => 93, 280 => 90, 274 => 86, 271 => 85, 268 => 84, 266 => 83, 261 => 80, 247 => 79, 243 => 77, 228 => 75, 220 => 73, 218 => 72, 213 => 70, 209 => 69, 202 => 66, 196 => 63, 183 => 61, 181 => 60, 175 => 58, 158 => 57, 147 => 51, 121 => 47, 118 => 46, 107 => 41, 101 => 34, 80 => 24, 63 => 16, 36 => 6, 156 => 58, 148 => 55, 142 => 50, 140 => 50, 127 => 45, 123 => 44, 115 => 42, 110 => 42, 104 => 35, 85 => 28, 68 => 20, 65 => 19, 59 => 16, 45 => 9, 103 => 24, 94 => 21, 91 => 20, 81 => 18, 74 => 22, 70 => 14, 66 => 12, 48 => 10, 25 => 4, 89 => 20, 82 => 19, 72 => 16, 64 => 15, 53 => 13, 92 => 39, 86 => 27, 77 => 23, 57 => 22, 19 => 2, 44 => 7, 27 => 3, 42 => 10, 33 => 5, 29 => 5, 41 => 7, 26 => 3, 223 => 96, 214 => 90, 210 => 88, 203 => 84, 199 => 83, 194 => 80, 192 => 62, 189 => 78, 187 => 77, 184 => 76, 178 => 72, 170 => 67, 161 => 63, 157 => 61, 152 => 59, 145 => 53, 130 => 48, 125 => 49, 119 => 45, 116 => 44, 112 => 43, 102 => 36, 98 => 33, 76 => 24, 73 => 23, 69 => 19, 61 => 24, 56 => 12, 39 => 7, 32 => 11, 24 => 3, 22 => 3, 30 => 4, 23 => 3, 20 => 2, 17 => 1, 182 => 70, 176 => 71, 169 => 62, 163 => 58, 160 => 57, 155 => 56, 151 => 54, 149 => 52, 141 => 54, 136 => 47, 134 => 50, 131 => 43, 128 => 47, 120 => 37, 117 => 36, 114 => 35, 109 => 32, 106 => 31, 100 => 30, 96 => 34, 93 => 33, 90 => 28, 87 => 19, 83 => 24, 79 => 25, 71 => 19, 62 => 15, 58 => 23, 55 => 14, 52 => 10, 49 => 9, 46 => 14, 43 => 8, 40 => 7, 37 => 6, 34 => 5, 31 => 4, 28 => 3,);
- }
- }