var/cache/dev/twig/e7/e73e88fabda4aff04580ce49fc5980fc.php line 118

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* pages/beat-detail.html.twig */
  14. class __TwigTemplate_ebbac53e0fd3887cc19e174ce482016d extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'bodyClass' => [$this'block_bodyClass'],
  25.             'body' => [$this'block_body'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "base.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""pages/beat-detail.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""pages/beat-detail.html.twig"));
  40.         // line 4
  41.         $macros["macros"] = $this->macros["macros"] = $this->loadTemplate("components/macros.html.twig""pages/beat-detail.html.twig"4)->unwrap();
  42.         // line 1
  43.         $this->parent $this->loadTemplate("base.html.twig""pages/beat-detail.html.twig"1);
  44.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 2
  51.     public function block_title($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  58.         echo "Battle detail";
  59.         
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  61.         
  62.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  63.     }
  64.     // line 3
  65.     public function block_bodyClass($context, array $blocks = [])
  66.     {
  67.         $macros $this->macros;
  68.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  69.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyClass"));
  70.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  71.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""bodyClass"));
  72.         echo "battleBody";
  73.         
  74.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  75.         
  76.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  77.     }
  78.     // line 6
  79.     public function block_body($context, array $blocks = [])
  80.     {
  81.         $macros $this->macros;
  82.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  83.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  84.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  85.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  86.         // line 7
  87.         echo "
  88.     <section id=\"beat\" class=\"beats mb-5\">
  89.         <div class=\"container\">
  90.             <div class=\"row\">
  91.                 <div class=\"col-12 heading\">
  92.                     <h2>";
  93.         // line 12
  94.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["beat"]) || array_key_exists("beat"$context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.'12$this->source); })()), "name", [], "any"falsefalsefalse12), "html"nulltrue);
  95.         echo "</h2>
  96.                 </div>
  97.             </div>
  98.             <div class=\"row\">
  99.                 <div class=\"card beat-card mb-4 box-shadow position-relative col-12\">
  100.                     <div class=\"card-bg position-absolute\">
  101.                         <img src=\"";
  102.         // line 19
  103.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("uploads/images/beats/" twig_get_attribute($this->env$this->source, (isset($context["beat"]) || array_key_exists("beat"$context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.'19$this->source); })()), "imageName", [], "any"falsefalsefalse19))), "html"nulltrue);
  104.         echo "\"  alt=\"Beat\"/>
  105.                     </div>
  106.                     <div class=\"card-controls position-absolute\">
  107.                         <div class=\"card-bottom-controls detail\">
  108.                             <div class=\"playingIndicator\" data-indicator-id='";
  109.         // line 26
  110.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["beat"]) || array_key_exists("beat"$context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.'26$this->source); })()), "id", [], "any"falsefalsefalse26), "html"nulltrue);
  111.         echo "' style='--piWidth: 0%;'></div>
  112.                             <div class=\"play-button\" data-id=\"";
  113.         // line 28
  114.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["beat"]) || array_key_exists("beat"$context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.'28$this->source); })()), "id", [], "any"falsefalsefalse28), "html"nulltrue);
  115.         echo "\" data-sample=\"";
  116.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["beat"]) || array_key_exists("beat"$context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.'28$this->source); })()), "instrumentalFileName", [], "any"falsefalsefalse28), "html"nulltrue);
  117.         echo "\">
  118.                                 <i class=\"bi bi-play-circle-fill text-white\" data-icon-id=\"";
  119.         // line 29
  120.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["beat"]) || array_key_exists("beat"$context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.'29$this->source); })()), "id", [], "any"falsefalsefalse29), "html"nulltrue);
  121.         echo "\"></i>
  122.                             </div>
  123.                         </div>
  124.                     </div>
  125.                 </div>
  126.             </div>
  127.             <div class=\"row\">
  128.                 <div class=\"col-md-6\">
  129.                     <div class=\"card mb-4 mb-md-0\">
  130.                         <div class=\"card-body\">
  131.                             <h5 class=\"mb-4\"> Beat details
  132.                             </h5>
  133.                             <p class=\"mb-1\" style=\"font-size: .77rem;\">Beat author</p>
  134.                             <p class=\"mb-4\">";
  135.         // line 44
  136.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["beat"]) || array_key_exists("beat"$context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.'44$this->source); })()), "author", [], "any"falsefalsefalse44), "pseudoname", [], "any"falsefalsefalse44), "html"nulltrue);
  137.         echo "</p>
  138.                             <p class=\"mb-1\" style=\"font-size: .77rem;\">Beat categories</p>
  139.                             ";
  140.         // line 47
  141.         $context["maxBeatCategory"] = twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["beat"]) || array_key_exists("beat"$context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.'47$this->source); })()), "category", [], "any"falsefalsefalse47));
  142.         // line 48
  143.         echo "                            <p class=\"mb-4\">";
  144.         $context['_parent'] = $context;
  145.         $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["beat"]) || array_key_exists("beat"$context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.'48$this->source); })()), "category", [], "any"falsefalsefalse48));
  146.         $context['loop'] = [
  147.           'parent' => $context['_parent'],
  148.           'index0' => 0,
  149.           'index'  => 1,
  150.           'first'  => true,
  151.         ];
  152.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  153.             $length count($context['_seq']);
  154.             $context['loop']['revindex0'] = $length 1;
  155.             $context['loop']['revindex'] = $length;
  156.             $context['loop']['length'] = $length;
  157.             $context['loop']['last'] = === $length;
  158.         }
  159.         foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
  160.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["category"], "name", [], "any"falsefalsefalse48), "html"nulltrue);
  161.             if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse48) != (isset($context["maxBeatCategory"]) || array_key_exists("maxBeatCategory"$context) ? $context["maxBeatCategory"] : (function () { throw new RuntimeError('Variable "maxBeatCategory" does not exist.'48$this->source); })()))) {
  162.                 echo ",";
  163.             }
  164.             echo " ";
  165.             ++$context['loop']['index0'];
  166.             ++$context['loop']['index'];
  167.             $context['loop']['first'] = false;
  168.             if (isset($context['loop']['length'])) {
  169.                 --$context['loop']['revindex0'];
  170.                 --$context['loop']['revindex'];
  171.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  172.             }
  173.         }
  174.         $_parent $context['_parent'];
  175.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
  176.         $context array_intersect_key($context$_parent) + $_parent;
  177.         echo "</p>
  178.                             <p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Created</p>
  179.                             <p class=\"mb-4\" >";
  180.         // line 51
  181.         echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["beat"]) || array_key_exists("beat"$context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.'51$this->source); })()), "createdAt", [], "any"falsefalsefalse51), "d/m/Y H:i:s"), "html"nulltrue);
  182.         echo "</p>
  183.                             <p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Likes</p>
  184.                             <p class=\"mb-4\" >";
  185.         // line 54
  186.         echo twig_escape_filter($this->envtwig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["beat"]) || array_key_exists("beat"$context) ? $context["beat"] : (function () { throw new RuntimeError('Variable "beat" does not exist.'54$this->source); })()), "favoritedClients", [], "any"falsefalsefalse54)), "html"nulltrue);
  187.         echo "x</p>
  188.                         </div>
  189.                     </div>
  190.                 </div>
  191.             </div>
  192.         </div>
  193.     </section>
  194. ";
  195.         
  196.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  197.         
  198.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  199.     }
  200.     /**
  201.      * @codeCoverageIgnore
  202.      */
  203.     public function getTemplateName()
  204.     {
  205.         return "pages/beat-detail.html.twig";
  206.     }
  207.     /**
  208.      * @codeCoverageIgnore
  209.      */
  210.     public function isTraitable()
  211.     {
  212.         return false;
  213.     }
  214.     /**
  215.      * @codeCoverageIgnore
  216.      */
  217.     public function getDebugInfo()
  218.     {
  219.         return array (  220 => 54,  214 => 51,  175 => 48,  173 => 47,  167 => 44,  149 => 29,  143 => 28,  138 => 26,  128 => 19,  118 => 12,  111 => 7,  101 => 6,  82 => 3,  63 => 2,  52 => 1,  50 => 4,  37 => 1,);
  220.     }
  221.     public function getSourceContext()
  222.     {
  223.         return new Source("{% extends \"base.html.twig\" %}
  224. {% block title %}Battle detail{% endblock %}
  225. {% block bodyClass %}battleBody{% endblock %}
  226. {% import \"components/macros.html.twig\" as macros %}
  227. {% block body %}
  228.     <section id=\"beat\" class=\"beats mb-5\">
  229.         <div class=\"container\">
  230.             <div class=\"row\">
  231.                 <div class=\"col-12 heading\">
  232.                     <h2>{{ beat.name }}</h2>
  233.                 </div>
  234.             </div>
  235.             <div class=\"row\">
  236.                 <div class=\"card beat-card mb-4 box-shadow position-relative col-12\">
  237.                     <div class=\"card-bg position-absolute\">
  238.                         <img src=\"{{ asset(\"uploads/images/beats/\"~ beat.imageName) }}\"  alt=\"Beat\"/>
  239.                     </div>
  240.                     <div class=\"card-controls position-absolute\">
  241.                         <div class=\"card-bottom-controls detail\">
  242.                             <div class=\"playingIndicator\" data-indicator-id='{{ beat.id }}' style='--piWidth: 0%;'></div>
  243.                             <div class=\"play-button\" data-id=\"{{ beat.id }}\" data-sample=\"{{ beat.instrumentalFileName }}\">
  244.                                 <i class=\"bi bi-play-circle-fill text-white\" data-icon-id=\"{{ beat.id }}\"></i>
  245.                             </div>
  246.                         </div>
  247.                     </div>
  248.                 </div>
  249.             </div>
  250.             <div class=\"row\">
  251.                 <div class=\"col-md-6\">
  252.                     <div class=\"card mb-4 mb-md-0\">
  253.                         <div class=\"card-body\">
  254.                             <h5 class=\"mb-4\"> Beat details
  255.                             </h5>
  256.                             <p class=\"mb-1\" style=\"font-size: .77rem;\">Beat author</p>
  257.                             <p class=\"mb-4\">{{ beat.author.pseudoname }}</p>
  258.                             <p class=\"mb-1\" style=\"font-size: .77rem;\">Beat categories</p>
  259.                             {% set maxBeatCategory = beat.category|length %}
  260.                             <p class=\"mb-4\">{% for category in beat.category %}{{ category.name }}{% if loop.index != maxBeatCategory %},{% endif %} {% endfor %}</p>
  261.                             <p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Created</p>
  262.                             <p class=\"mb-4\" >{{ beat.createdAt|date(\"d/m/Y H:i:s\") }}</p>
  263.                             <p class=\"mt-4 mb-1\" style=\"font-size: .77rem;\">Likes</p>
  264.                             <p class=\"mb-4\" >{{ beat.favoritedClients|length }}x</p>
  265.                         </div>
  266.                     </div>
  267.                 </div>
  268.             </div>
  269.         </div>
  270.     </section>
  271. {% endblock %}""pages/beat-detail.html.twig""/home/u568363158/domains/rapbattleonline.com/public_html/templates/pages/beat-detail.html.twig");
  272.     }
  273. }