var/cache/dev/twig/12/120cccb69a8567a8ff3d2238aa5268387502d567bc655e3bc51957996ff26bb4.php line 53

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. /* @AqarmapNeighborhoodBundle/card.html.twig */
  14. class __TwigTemplate_b8b918d688e9adff29b2917070c5345e1354e2112cdea92d28fcc4c8eb2c2175 extends \Twig\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->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@AqarmapNeighborhoodBundle/card.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@AqarmapNeighborhoodBundle/card.html.twig"));
  33.         // line 1
  34.         echo "<div class=\"listing-card clearfix\">
  35.     <a href=\"";
  36.         // line 2
  37.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("neighborhood_main_page", ["location_slug" => twig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'2$this->source); })()), "slug", [], "any"falsefalsefalse2)]), "html"nulltrue);
  38.         echo "\" target=\"_blank\">
  39.         ";
  40.         // line 3
  41.         if (twig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'3$this->source); })()), "mainPhoto", [], "any"falsefalsefalse3)) {
  42.             // line 4
  43.             echo "            <img class=\"lazyload\" src=\"/images/placeholder.svg\" data-src=\"";
  44.             echo twig_escape_filter($this->env$this->extensions['Aqarmap\Bundle\MainBundle\Twig\ThumbnailExtension']->getThumbnail($this->extensions['Aqarmap\Bundle\ListingBundle\Twig\ListingShareExtension']->customVichUploaderAsset(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'4$this->source); })()), "mainPhoto", [], "any"falsefalsefalse4), "file", [], "any"falsefalsefalse4), "file"), "search-thumb"), "html"nulltrue);
  45.             echo "\" alt=\"";
  46.             echo twig_escape_filter($this->env$this->extensions['Aqarmap\Bundle\ListingBundle\Twig\ListingExtension']->excludeNumbers(twig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'4$this->source); })()), "title", [], "any"falsefalsefalse4)), "html"nulltrue);
  47.             echo "\" width=\"368\">
  48.         ";
  49.         } else {
  50.             // line 6
  51.             echo "            <img  src=\"";
  52.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("https://placehold.it/368x250/FCFCFC/B6B6B6&text=No+Photo"), "html"nulltrue);
  53.             echo "\" alt=\"";
  54.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'6$this->source); })()), "title", [], "any"falsefalsefalse6), "html"nulltrue);
  55.             echo "\" width=\"368\">
  56.         ";
  57.         }
  58.         // line 8
  59.         echo "    </a>
  60.     <p class=\"titleTag\"><a href=\"";
  61.         // line 9
  62.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("neighborhood_main_page", ["location_slug" => twig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'9$this->source); })()), "slug", [], "any"falsefalsefalse9)]), "html"nulltrue);
  63.         echo "\" target=\"_blank\">";
  64.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'9$this->source); })()), "title", [], "any"falsefalsefalse9), "html"nulltrue);
  65.         echo "</a></p>
  66.         ";
  67.         // line 10
  68.         if ((twig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'10$this->source); })()), "compoundFilter", [], "any"falsefalsefalse10) && (twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'10$this->source); })()), "propertyTypes", [], "any"falsefalsefalse10)) > 0))) {
  69.             // line 11
  70.             echo "            <p>
  71.                 ";
  72.             // line 12
  73.             $context['_parent'] = $context;
  74.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'12$this->source); })()), "propertyTypes", [], "any"falsefalsefalse12));
  75.             $context['loop'] = [
  76.               'parent' => $context['_parent'],
  77.               'index0' => 0,
  78.               'index'  => 1,
  79.               'first'  => true,
  80.             ];
  81.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  82.                 $length count($context['_seq']);
  83.                 $context['loop']['revindex0'] = $length 1;
  84.                 $context['loop']['revindex'] = $length;
  85.                 $context['loop']['length'] = $length;
  86.                 $context['loop']['last'] = === $length;
  87.             }
  88.             foreach ($context['_seq'] as $context["_key"] => $context["propertytype"]) {
  89.                 // line 13
  90.                 echo "                    ";
  91.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["propertytype"], "title", [], "any"falsefalsefalse13), "html"nulltrue);
  92.                 echo " ";
  93.                 if ( !twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse13)) {
  94.                     echo " - ";
  95.                 }
  96.                 // line 14
  97.                 echo "                ";
  98.                 ++$context['loop']['index0'];
  99.                 ++$context['loop']['index'];
  100.                 $context['loop']['first'] = false;
  101.                 if (isset($context['loop']['length'])) {
  102.                     --$context['loop']['revindex0'];
  103.                     --$context['loop']['revindex'];
  104.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  105.                 }
  106.             }
  107.             $_parent $context['_parent'];
  108.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['propertytype'], $context['_parent'], $context['loop']);
  109.             $context array_intersect_key($context$_parent) + $_parent;
  110.             // line 15
  111.             echo "            </p>
  112.         ";
  113.         }
  114.         // line 17
  115.         echo "    <div class=\"clearfix priceContainer\">
  116.         <a href=\"";
  117.         // line 18
  118.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("neighborhood_main_page", ["location_slug" => twig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'18$this->source); })()), "slug", [], "any"falsefalsefalse18)]), "html"nulltrue);
  119.         echo "\" target=\"_blank\" class=\"detailsButton\">";
  120.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("layout.details_button"), "html"nulltrue);
  121.         echo "</a>
  122.         ";
  123.         // line 19
  124.         if ((twig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'19$this->source); })()), "getSingleStatistics", [], "method"falsefalsefalse19) && twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'19$this->source); })()), "getSingleStatistics", [], "method"falsefalsefalse19), "avgPrice", [], "any"falsefalsefalse19))) {
  125.             // line 20
  126.             echo "            <ul>
  127.                 <li id=\"price\"><span class=\"integer\">";
  128.             // line 21
  129.             echo twig_escape_filter($this->envtwig_number_format_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood"$context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.'21$this->source); })()), "getSingleStatistics", [], "method"falsefalsefalse21), "avgPrice", [], "any"falsefalsefalse21)), "html"nulltrue);
  130.             echo " ";
  131.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->extensions['Aqarmap\Bundle\MainBundle\Twig\SettingExtension']->getSetting("general""currency")), "html"nulltrue);
  132.             echo "</span>
  133.                 </li>
  134.                 <li> ";
  135.             // line 23
  136.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("neighborhoods.average"), "html"nulltrue);
  137.             echo "</li>
  138.             </ul>
  139.         ";
  140.         }
  141.         // line 26
  142.         echo "    </div>
  143. </div><!-- end .neighborhood.clearfix -->
  144. ";
  145.         
  146.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  147.         
  148.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  149.     }
  150.     public function getTemplateName()
  151.     {
  152.         return "@AqarmapNeighborhoodBundle/card.html.twig";
  153.     }
  154.     public function isTraitable()
  155.     {
  156.         return false;
  157.     }
  158.     public function getDebugInfo()
  159.     {
  160.         return array (  151 => 26,  145 => 23,  138 => 21,  135 => 20,  133 => 19,  127 => 18,  124 => 17,  120 => 15,  106 => 14,  99 => 13,  82 => 12,  79 => 11,  77 => 10,  71 => 9,  68 => 8,  60 => 6,  52 => 4,  50 => 3,  46 => 2,  43 => 1,);
  161.     }
  162.     public function getSourceContext()
  163.     {
  164.         return new Source("<div class=\"listing-card clearfix\">
  165.     <a href=\"{{ path('neighborhood_main_page', {'location_slug' : neighborhood.slug })}}\" target=\"_blank\">
  166.         {% if neighborhood.mainPhoto %}
  167.             <img class=\"lazyload\" src=\"/images/placeholder.svg\" data-src=\"{{ custom_vich_uploader_asset(neighborhood.mainPhoto.file, 'file') | thumbnail('search-thumb') }}\" alt=\"{{ neighborhood.title|excludeNumbers }}\" width=\"368\">
  168.         {% else %}
  169.             <img  src=\"{{ asset('https://placehold.it/368x250/FCFCFC/B6B6B6&text=No+Photo') }}\" alt=\"{{ neighborhood.title }}\" width=\"368\">
  170.         {% endif %}
  171.     </a>
  172.     <p class=\"titleTag\"><a href=\"{{ path('neighborhood_main_page', {'location_slug' : neighborhood.slug })}}\" target=\"_blank\">{{ neighborhood.title }}</a></p>
  173.         {% if neighborhood.compoundFilter and neighborhood.propertyTypes|length > 0 %}
  174.             <p>
  175.                 {% for propertytype in neighborhood.propertyTypes %}
  176.                     {{ propertytype.title }} {% if not loop.last %} - {% endif %}
  177.                 {% endfor %}
  178.             </p>
  179.         {% endif %}
  180.     <div class=\"clearfix priceContainer\">
  181.         <a href=\"{{ path('neighborhood_main_page', {'location_slug' : neighborhood.slug })}}\" target=\"_blank\" class=\"detailsButton\">{{ 'layout.details_button'|trans }}</a>
  182.         {% if neighborhood.getSingleStatistics() and neighborhood.getSingleStatistics().avgPrice %}
  183.             <ul>
  184.                 <li id=\"price\"><span class=\"integer\">{{ neighborhood.getSingleStatistics().avgPrice|number_format }} {{ get_setting('general', 'currency')|trans }}</span>
  185.                 </li>
  186.                 <li> {{ \"neighborhoods.average\"|trans }}</li>
  187.             </ul>
  188.         {% endif %}
  189.     </div>
  190. </div><!-- end .neighborhood.clearfix -->
  191. ""@AqarmapNeighborhoodBundle/card.html.twig""/srv/moonshot/src/Aqarmap/Bundle/NeighborhoodBundle/Resources/views/card.html.twig");
  192.     }
  193. }