当前位置: 首页>>代码示例>>PHP>>正文


PHP twig_slice函数代码示例

本文整理汇总了PHP中twig_slice函数的典型用法代码示例。如果您正苦于以下问题:PHP twig_slice函数的具体用法?PHP twig_slice怎么用?PHP twig_slice使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了twig_slice函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: doDisplay

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 3
        echo "<div class=\"block-type-feed-reader item-list\">
    <div class=\"attribute-header\">
        <h2>
        ";
        // line 6
        if ((!twig_test_empty($this->getAttribute((isset($context["feed"]) ? $context["feed"] : $this->getContext($context, "feed")), "link", array())))) {
            // line 7
            echo "            <a href=\"";
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["feed"]) ? $context["feed"] : $this->getContext($context, "feed")), "link", array()), 0, array(), "array"), "href", array()), "html", null, true);
            echo "\" title=\"";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["feed"]) ? $context["feed"] : $this->getContext($context, "feed")), "title", array()), "html", null, true);
            echo "\">";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["feed"]) ? $context["feed"] : $this->getContext($context, "feed")), "title", array()), "html", null, true);
            echo "</a>
        ";
        } else {
            // line 9
            echo "            ";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["feed"]) ? $context["feed"] : $this->getContext($context, "feed")), "title", array()), "html", null, true);
            echo "
        ";
        }
        // line 11
        echo "        </h2>
    </div>
    <article>
        <ul>
        ";
        // line 16
        echo "        ";
        // line 17
        echo "        ";
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable(twig_slice($this->env, $this->getAttribute((isset($context["feed"]) ? $context["feed"] : $this->getContext($context, "feed")), "item", array()), (isset($context["offset"]) ? $context["offset"] : $this->getContext($context, "offset")), (isset($context["limit"]) ? $context["limit"] : $this->getContext($context, "limit"))));
        foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
            // line 18
            echo "            <li>
                <a href=\"";
            // line 19
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute($context["item"], "link", array()), 0, array(), "array"), "href", array()), "html", null, true);
            echo "\" title=\"";
            echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "title", array()), "html", null, true);
            echo "\">";
            echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "title", array()), "html", null, true);
            echo "</a>
            </li>
        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 22
        echo "        </ul>
    </article>
</div>
";
    }
开发者ID:ataxel,项目名称:tp,代码行数:60,代码来源:676490f77f107b930a362366b9f25b358d34aca76f6c6e81f6ced790a2b5.php

示例2: block_money_widget

 public function block_money_widget($context, array $blocks = array())
 {
     // line 24
     echo "<div class=\"input-group\">\n        ";
     // line 25
     $context["prepend"] = "{{" == twig_slice($this->env, $this->getContext($context, "money_pattern"), 0, 2);
     // line 26
     echo "        ";
     if (!$this->getContext($context, "prepend")) {
         // line 27
         echo "            <span class=\"input-group-addon\">";
         echo twig_escape_filter($this->env, strtr($this->getContext($context, "money_pattern"), array("{{ widget }}" => "")), "html", null, true);
         echo "</span>\n        ";
     }
     // line 29
     $this->displayBlock("form_widget_simple", $context, $blocks);
     // line 30
     if ($this->getContext($context, "prepend")) {
         // line 31
         echo "            <span class=\"input-group-addon\">";
         echo twig_escape_filter($this->env, strtr($this->getContext($context, "money_pattern"), array("{{ widget }}" => "")), "html", null, true);
         echo "</span>\n        ";
     }
     // line 33
     echo "    </div>";
 }
开发者ID:guich25,项目名称:AppConge,代码行数:26,代码来源:c898785fcb4201fd74caa5edd2938c69052c2807bda99b4ddcd141854748.php

示例3: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "require({\n    shim: {\n        'oro/routes': {\n            deps: ['routing'],\n            init: function(routing) {\n                ";
     // line 6
     if (!$this->getAttribute(isset($context["app"]) ? $context["app"] : null, "debug", array())) {
         // line 7
         echo "                routing.setBaseUrl(";
         echo twig_jsonencode_filter(twig_slice($this->env, $this->env->getExtension('asset')->getAssetUrl(""), 0, -1));
         echo ");\n                ";
     }
     // line 9
     echo "                return routing;\n            }\n        }\n    },\n    map: {\n        '*': {\n            'routing': 'oro/routes'\n        },\n        'oro/routes': {\n            'routing': 'routing'\n        }\n    },\n    paths: {\n    ";
     // line 22
     if ($this->getAttribute(isset($context["app"]) ? $context["app"] : null, "debug", array())) {
         // line 23
         echo "        'oro/routes': '";
         echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("fos_js_routing_js", array("callback" => "fos.Router.setData")), "js", null, true);
         echo "'\n    ";
     } else {
         // line 25
         echo "        'oro/routes': '../js/routes'\n    ";
     }
     // line 27
     echo "    }\n});\n";
 }
开发者ID:aml-bendall,项目名称:ExpandAkeneoApi,代码行数:26,代码来源:b121afe994067765632e6f476b2ce5a2e678886605c29d43715d0cb1ec7ed246.php

示例4: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     $context["FileType"] = twig_slice($this->env, $this->getAttribute(isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity"), "mime", array()), 0, 5);
     // line 2
     if ((isset($context["FileType"]) ? $context["FileType"] : $this->getContext($context, "FileType")) == "image") {
         // line 3
         echo "    ";
         if ($this->getAttribute(isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity"), "resized", array())) {
             // line 4
             echo "        ";
             $context["Path"] = $this->env->getExtension('assets')->getAssetUrl("web/attachment/TH_" . $this->getAttribute(isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity"), "name", array()));
             // line 5
             echo "    ";
         } else {
             // line 6
             echo "        ";
             $context["Path"] = $this->env->getExtension('assets')->getAssetUrl("web/attachment/" . $this->getAttribute(isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity"), "name", array()));
             // line 7
             echo "    ";
         }
     } else {
         // line 9
         echo "    ";
         $context["Path"] = $this->env->getExtension('assets')->getAssetUrl("web/image/attachment-upload-no-photo.png");
     }
     // line 11
     $this->loadTemplate("ProshutAttachmentBundle:Default:update.html.twig", "ProshutAttachmentBundle:Default:update.html.twig", 11, "935343275")->display(array_merge($context, array("template" => "ProshutGridBundle:Factory:update.html.twig")));
     // line 27
     echo "\n";
 }
开发者ID:hamidudc,项目名称:Proshut,代码行数:31,代码来源:89cbc1d199b983b9644483676859b4eaebf331329b89fb60d81ed86ef2fcbb62.php

示例5: block_body

 public function block_body($context, array $blocks = array())
 {
     $__internal_04968b4ed1b08b263b23d9238c96c80194bd1be73d78a5f6bf3076f2771e6e2c = $this->env->getExtension("native_profiler");
     $__internal_04968b4ed1b08b263b23d9238c96c80194bd1be73d78a5f6bf3076f2771e6e2c->enter($__internal_04968b4ed1b08b263b23d9238c96c80194bd1be73d78a5f6bf3076f2771e6e2c_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "body"));
     // line 3
     echo "    ";
     $this->displayBlock('banner', $context, $blocks);
     // line 26
     echo "\n    <div class=\"container\">\n        <h2 class=\"text-center\">Užsiregistravę meistrai</h2>\n        <hr>\n        <div class=\"row text-center\">\n            ";
     // line 31
     $context['_parent'] = $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["user"]) ? $context["user"] : $this->getContext($context, "user"));
     foreach ($context['_seq'] as $context["_key"] => $context["userInfo"]) {
         // line 32
         echo "            <div class=\"col-md-3 col-sm-6 worker-box\">\n                <div class=\"thumbnail\">\n                    ";
         // line 34
         $context["runtimeConfig"] = array("thumbnail" => array("size" => array(0 => 240, 1 => 210)));
         // line 35
         echo "                    <img class=\"img-responsive img-rounded\" src=\"";
         echo twig_escape_filter($this->env, $this->env->getExtension('liip_imagine')->filter($this->env->getExtension('asset')->getAssetUrl($this->getAttribute($context["userInfo"], "profilePicturePath", array())), "my_thumb", isset($context["runtimeConfig"]) ? $context["runtimeConfig"] : $this->getContext($context, "runtimeConfig")), "html", null, true);
         echo "\">\n                    <div class=\"worker-content\">\n                        <h2>";
         // line 37
         echo twig_escape_filter($this->env, $this->getAttribute($context["userInfo"], "name", array()), "html", null, true);
         echo "</h2>\n                        <h4>Miestas: ";
         // line 38
         echo twig_escape_filter($this->env, $this->getAttribute($context["userInfo"], "city", array()), "html", null, true);
         echo "</h4>\n                        <p>";
         // line 39
         echo twig_escape_filter($this->env, twig_slice($this->env, $this->getAttribute($context["userInfo"], "description", array()), 0, 140), "html", null, true);
         echo " ";
         if (twig_length_filter($this->env, $this->getAttribute($context["userInfo"], "description", array())) > 150) {
             echo "...";
         }
         echo "</p>\n                    </div>\n                    <div class=\"rateit\"  id=\"";
         // line 41
         echo twig_escape_filter($this->env, $this->getAttribute($context["userInfo"], "id", array()), "html", null, true);
         echo "\">\n                        <p>Vertinimas: ";
         // line 42
         echo twig_escape_filter($this->env, $this->getAttribute($context["userInfo"], "Rating", array()), "html", null, true);
         echo ".  Balsavusiųjų ";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($context["userInfo"], "userRatings", array()), "count", array()), "html", null, true);
         echo "</p>\n                        Vertinti:\n                    </div>\n                    <ul class=\"list-inline\">\n                        <li><a class=\"btn btn-primary\" href=\"";
         // line 46
         echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("worker_info", array("name" => $this->getAttribute($context["userInfo"], "name", array()))), "html", null, true);
         echo "\" role=\"button\">Registruotis &raquo;</a></li>\n                        <li><a class=\"btn btn-primary messageModal\"  href=\"#\" userId=\"";
         // line 47
         echo twig_escape_filter($this->env, $this->getAttribute($context["userInfo"], "id", array()), "html", null, true);
         echo "\" role=\"button\">Susisiekti &raquo;</a></li>\n                    </ul>\n                </div>\n            </div>\n            ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['userInfo'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 52
     echo "        </div>\n    </div>\n        <hr>\n\n    ";
     // line 56
     $this->displayBlock('modals', $context, $blocks);
     $__internal_04968b4ed1b08b263b23d9238c96c80194bd1be73d78a5f6bf3076f2771e6e2c->leave($__internal_04968b4ed1b08b263b23d9238c96c80194bd1be73d78a5f6bf3076f2771e6e2c_prof);
 }
开发者ID:deileo,项目名称:Autoservisas_Kursinis,代码行数:58,代码来源:7469d24980a2db6de6d5532ff077e6195b94c728dbce84d4e5f2c387dea79fdb.php

示例6: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "<div class=\"communication_list_count\">\n    ";
     // line 2
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pagination"]) ? $context["pagination"] : null, "getTotalItemCount", array()), "html", null, true);
     echo " communication(s) trouvée(s)\n</div>\n\n";
     // line 11
     echo "\n<div class=\"communication_list_pagination\">\n    ";
     // line 13
     echo $this->env->getExtension('knp_pagination')->render(isset($context["pagination"]) ? $context["pagination"] : null);
     echo "\n</div>\n\n";
     // line 16
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["pagination"]) ? $context["pagination"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["communication"]) {
         // line 17
         echo "    <div class=\"communication_item\" >\n        <table>\n            <tr>\n                <td valign=\"top\">\n\n                    <div class=\"communication_user_and_date\" >\n                        <div class=\"communication_user_image\" >\n                            ";
         // line 27
         echo "                            <a href=\"";
         echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("aet_annuaire_communication_view", array("id" => $this->getAttribute($context["communication"], "id", array()))), "html", null, true);
         echo "\">\n                                <img\n                                  src=\"";
         // line 29
         echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl($this->getAttribute($this->getAttribute($context["communication"], "image", array()), "webPath", array())), "html", null, true);
         echo "\"\n                                  alt=\"";
         // line 30
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($context["communication"], "image", array()), "alt", array()), "html", null, true);
         echo "\"\n                                />\n                            </a>\n                        </div>\n                        <div class=\"communication_user_name\"><i>Par ";
         // line 34
         echo twig_escape_filter($this->env, twig_capitalize_string_filter($this->env, $this->getAttribute($this->getAttribute($context["communication"], "user", array()), "firstName", array())), "html", null, true);
         echo " ";
         echo twig_escape_filter($this->env, twig_upper_filter($this->env, $this->getAttribute($this->getAttribute($context["communication"], "user", array()), "lastName", array())), "html", null, true);
         echo "</i></div>\n                        <div class=\"communication_date\"><i>Le ";
         // line 35
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($context["communication"], "date", array()), "d/m/Y"), "html", null, true);
         echo "</i></div>\n                    </div>\n\n                </td>\n                <td valign=\"top\">\n                    <div class=\"communication_title\" >\n                        <a href=\"";
         // line 41
         echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("aet_annuaire_communication_view", array("id" => $this->getAttribute($context["communication"], "id", array()))), "html", null, true);
         echo "\">";
         echo twig_length_filter($this->env, $this->getAttribute($context["communication"], "title", array())) > 80 ? twig_slice($this->env, $this->getAttribute($context["communication"], "title", array()), 0, 80) . "..." : $this->getAttribute($context["communication"], "title", array());
         echo "</a>\n                    </div>\n                    <div class=\"communication_body\" >\n                        ";
         // line 45
         echo "                        ";
         echo twig_escape_filter($this->env, $this->getAttribute($context["communication"], "shortDesc", array()), "html", null, true);
         echo "\n                    </div>\n                </td>\n            </tr>\n\n\n        </table>\n    </div>\n";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['communication'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 54
     echo "\n";
     // line 56
     echo "<div class=\"communication_list_pagination\">\n    ";
     // line 57
     echo $this->env->getExtension('knp_pagination')->render(isset($context["pagination"]) ? $context["pagination"] : null);
     echo "\n</div>";
 }
开发者ID:AetFrance,项目名称:SiteFoyerAet,代码行数:57,代码来源:0003d2b8fe95f9ed547dcb844e1bfe062b8959ea5862a03ca3cc40c36e83.php

示例7: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "<!doctype html>\n<html>\n<head>\n    <meta charset=\"utf-8\" />\n    <title>";
     // line 5
     if (isset($context["ezpublish"])) {
         $_ezpublish_ = $context["ezpublish"];
     } else {
         $_ezpublish_ = null;
     }
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(twig_slice($this->env, twig_reverse_filter($this->env, $this->getAttribute($this->getAttribute($_ezpublish_, "legacy"), "get", array(0 => "title_path"), "method")), 0, 2));
     $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["_key"] => $context["element"]) {
         // line 6
         echo "        ";
         if (isset($context["element"])) {
             $_element_ = $context["element"];
         } else {
             $_element_ = null;
         }
         echo twig_escape_filter($this->env, $this->getAttribute($_element_, "text"), "html", null, true);
         if (isset($context["loop"])) {
             $_loop_ = $context["loop"];
         } else {
             $_loop_ = null;
         }
         if (!$this->getAttribute($_loop_, "last")) {
             echo " / ";
         }
         // line 7
         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['_key'], $context['element'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     echo "</title>\n</head>\n<body>\n    <h1>Default layout</h1>\n    <p>\n        This is the default layout provided by the EzPublishLegacyBundle. To\n        override it, you can use the following configuration:\n    </p>\n    <pre>\n        # for instance in ezpublish.yml\n        # The \"default\" scope can be replaced by any available scope\n        # https://confluence.ez.no/display/EZP/Configuration#Configuration-Scope\n        parameters:\n            ezpublish_legacy.default.view_default_layout: YourBundle::pagelayout.html.twig\n    </pre>\n\n    <h1>The legacy generated content</h1>\n    <div class=\"content\">\n        ";
     // line 25
     $this->displayBlock('content', $context, $blocks);
     // line 26
     echo "    </div>\n</body>\n</html>\n";
 }
开发者ID:jordanmanning,项目名称:ezpublish,代码行数:57,代码来源:a240ce3eb7b48ccef8d1b3f005f55be4682685f126ea4634264aec4453cf.php

示例8: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     $__internal_e91b144b90791d9583d01b8ec8827edd1bb45404c5198115d5481307200a63d6 = $this->env->getExtension("native_profiler");
     $__internal_e91b144b90791d9583d01b8ec8827edd1bb45404c5198115d5481307200a63d6->enter($__internal_e91b144b90791d9583d01b8ec8827edd1bb45404c5198115d5481307200a63d6_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "TRCCoreBundle:Affichage:ddp.html.twig"));
     // line 1
     if ($this->getAttribute(isset($context["profil"]) ? $context["profil"] : $this->getContext($context, "profil"), "ddp", array())) {
         // line 2
         echo "   ";
         if (twig_length_filter($this->env, isset($context["ddps"]) ? $context["ddps"] : $this->getContext($context, "ddps")) > 0) {
             // line 3
             echo "   \t\t<table class=\"table table-condensed table-striped\">\n   \t\t\t<thead>\n   \t\t\t\t<tr>\n   \t\t\t\t\t<th>Min</th>\n   \t\t\t\t\t<th>Max</th>\n   \t\t\t\t\t<th>Crédit(s)</th>\n   \t\t\t\t\t<th>Description</th>\n   \t\t\t\t</tr>\n   \t\t\t</thead>\n   \t\t\t<tbody>\n   \t\t\t\t";
             // line 13
             $context['_parent'] = $context;
             $context['_seq'] = twig_ensure_traversable(isset($context["ddps"]) ? $context["ddps"] : $this->getContext($context, "ddps"));
             foreach ($context['_seq'] as $context["_key"] => $context["ddp"]) {
                 // line 14
                 echo "   \t\t\t\t\t<tr>\n   \t\t\t\t\t\t<td>";
                 // line 15
                 echo twig_escape_filter($this->env, $this->getAttribute($context["ddp"], "min", array()), "html", null, true);
                 echo " </td>\n   \t\t\t\t\t\t<td>";
                 // line 16
                 echo twig_escape_filter($this->env, $this->getAttribute($context["ddp"], "max", array()), "html", null, true);
                 echo " </td>\n   \t\t\t\t\t\t<td>\n   \t\t\t\t\t\t\t";
                 // line 18
                 $context['_parent'] = $context;
                 $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["ddp"], "tdc", array()));
                 foreach ($context['_seq'] as $context["_key"] => $context["tdc"]) {
                     // line 19
                     echo "   \t\t\t\t\t\t\t\t";
                     echo twig_escape_filter($this->env, $this->getAttribute($context["tdc"], "nom", array()), "html", null, true);
                     echo " |\n   \t\t\t\t\t\t\t";
                 }
                 $_parent = $context['_parent'];
                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tdc'], $context['_parent'], $context['loop']);
                 $context = array_intersect_key($context, $_parent) + $_parent;
                 // line 21
                 echo "   \t\t\t\t\t\t</td>\n   \t\t\t\t\t\t<td>";
                 // line 22
                 echo twig_escape_filter($this->env, twig_slice($this->env, $this->getAttribute($context["ddp"], "description", array()), 0, 60), "html", null, true);
                 echo " </td>\n   \t\t\t\t\t</tr>\n\n   \t\t\t\t";
             }
             $_parent = $context['_parent'];
             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ddp'], $context['_parent'], $context['loop']);
             $context = array_intersect_key($context, $_parent) + $_parent;
             // line 26
             echo "   \t\t\t</tbody>\n   \t\t</table>\n   \t";
         } else {
             // line 29
             echo "   \t\t<div class=\"alert-info alert text-center\">\n   \t\t\t<h3>\n   \t\t\t\tAucune DDP\n   \t\t\t</h3>\n   \t\t</div>\n   ";
         }
     } else {
         // line 36
         echo "    <div class=\"alert text-center\">\n        Le profil actuel n'exige pas de DDP\n    </div>\n";
     }
     $__internal_e91b144b90791d9583d01b8ec8827edd1bb45404c5198115d5481307200a63d6->leave($__internal_e91b144b90791d9583d01b8ec8827edd1bb45404c5198115d5481307200a63d6_prof);
 }
开发者ID:junioraby,项目名称:TRDC,代码行数:56,代码来源:676bc8a870963363705d9cb0000e64edc0094bad00f3ec932260aeea4e87074d.php

示例9: block_body

 public function block_body($context, array $blocks = array())
 {
     // line 4
     echo "    <div id=\"wrapper\">\n        <div id=\"container\">\n            <div id=\"welcome\">\n                <h1><span>Welcome to</span> Symfony ";
     // line 7
     echo twig_escape_filter($this->env, twig_constant("Symfony\\Component\\HttpKernel\\Kernel::VERSION"), "html", null, true);
     echo "</h1>\n            </div>\n\n            <div id=\"status\">\n                <p>\n                    <svg id=\"icon-status\" width=\"1792\" height=\"1792\" viewBox=\"0 0 1792 1792\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z\" fill=\"#759E1A\"/></svg>\n\n                </p>\n            </div>\n\n            <div id=\"next\">\n                <h2>What's next?</h2>\n                <p>\n                    <svg id=\"icon-book\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"-12.5 9 64 64\" enable-background=\"new -12.5 9 64 64\" xml:space=\"preserve\">\n                        <path fill=\"#AAA\" d=\"M6.8,40.8c2.4,0.8,4.5-0.7,4.9-2.5c0.2-1.2-0.3-2.1-1.3-3.2l-0.8-0.8c-0.4-0.5-0.6-1.3-0.2-1.9\n                            c0.4-0.5,0.9-0.8,1.8-0.5c1.3,0.4,1.9,1.3,2.9,2.2c-0.4,1.4-0.7,2.9-0.9,4.2l-0.2,1c-0.7,4-1.3,6.2-2.7,7.5\n                            c-0.3,0.3-0.7,0.5-1.3,0.6c-0.3,0-0.4-0.3-0.4-0.3c0-0.3,0.2-0.3,0.3-0.4c0.2-0.1,0.5-0.3,0.4-0.8c0-0.7-0.6-1.3-1.3-1.3\n                            c-0.6,0-1.4,0.6-1.4,1.7s1,1.9,2.4,1.8c0.8,0,2.5-0.3,4.2-2.5c2-2.5,2.5-5.4,2.9-7.4l0.5-2.8c0.3,0,0.5,0.1,0.8,0.1\n                            c2.4,0.1,3.7-1.3,3.7-2.3c0-0.6-0.3-1.2-0.9-1.2c-0.4,0-0.8,0.3-1,0.8c-0.1,0.6,0.8,1.1,0.1,1.5c-0.5,0.3-1.4,0.6-2.7,0.4l0.3-1.3\n                            c0.5-2.6,1-5.7,3.2-5.8c0.2,0,0.8,0,0.8,0.4c0,0.2,0,0.2-0.2,0.5c-0.2,0.3-0.3,0.4-0.2,0.7c0,0.7,0.5,1.1,1.2,1.1\n                            c0.9,0,1.2-1,1.2-1.4c0-1.2-1.2-1.8-2.6-1.8c-1.5,0.1-2.8,0.9-3.7,2.1c-1.1,1.3-1.8,2.9-2.3,4.5c-0.9-0.8-1.6-1.8-3.1-2.3\n                            c-1.1-0.7-2.3-0.5-3.4,0.3c-0.5,0.4-0.8,1-1,1.6c-0.4,1.5,0.4,2.9,0.8,3.4l0.9,1c0.2,0.2,0.6,0.8,0.4,1.5c-0.3,0.8-1.2,1.3-2.1,1\n                            c-0.4-0.2-1-0.5-0.9-0.9c0.1-0.2,0.2-0.3,0.3-0.5s0.1-0.3,0.1-0.3c0.2-0.6-0.1-1.4-0.7-1.6c-0.6-0.2-1.2,0-1.3,0.8\n                            C4.3,38.4,4.7,40,6.8,40.8z M46.1,20.9c0-4.2-3.2-7.5-7.1-7.5h-3.8C34.8,10.8,32.7,9,30.2,9L-2.3,9.1c-2.8,0.1-4.9,2.4-4.9,5.4\n                            L-7,58.6c0,4.8,8.1,13.9,11.6,14.1l34.7-0.1c3.9,0,7-3.4,7-7.6L46.1,20.9z M-0.3,36.4c0-8.6,6.5-15.6,14.5-15.6\n                            c8,0,14.5,7,14.5,15.6S22.1,52,14.2,52C6.1,52-0.3,45-0.3,36.4z M42.1,65.1c0,1.8-1.5,3.1-3.1,3.1H4.6c-0.7,0-3-1.8-4.5-4.4h30.4\n                            c2.8,0,5-2.4,5-5.4V17.9h3.7c1.6,0,2.9,1.4,2.9,3.1V65.1L42.1,65.1z\"/>\n                    </svg>\n\n                    Read Symfony documentation to learn\n                    <a href=\"http://symfony.com/doc/";
     // line 37
     echo twig_escape_filter($this->env, twig_slice($this->env, twig_constant("Symfony\\Component\\HttpKernel\\Kernel::VERSION"), 0, 3), "html", null, true);
     echo "/book/page_creation.html\">\n                        How to create your first page in Symfony\n                    </a>\n                </p>\n            </div>\n\n        </div>\n    </div>\n";
 }
开发者ID:ewrwq,项目名称:xh,代码行数:11,代码来源:cc269d30d83532f2fe9b09f07d178a569bd4b6a65156c2953d2886b032e58668.php

示例10: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "<section id=\"news\">\n    <div class=\"container-fluid\">\n        <div class=\"row\">\n            ";
     // line 4
     $context['_parent'] = $context;
     $context['_seq'] = twig_ensure_traversable(twig_slice($this->env, isset($context["posts"]) ? $context["posts"] : null, 0, 2));
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
         // line 5
         echo "            <div class=\"col-md-6\">\n                <article class=\"row\">\n                    <h1>";
         // line 7
         echo twig_escape_filter($this->env, $this->getAttribute($context["post"], "title", array()), "html", null, true);
         echo "</h1>\n                    <div class=\"col-md-6 col-lg-4\">\n                        ";
         // line 9
         if (twig_length_filter($this->env, $this->getAttribute($context["post"], "featured_images", array())) > 0) {
             // line 10
             echo "                            <a href=\"#\">\n                                <img class=\"support-image img-responsive center-block\" src=\"";
             // line 11
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute($context["post"], "featured_images", array()), 0, array()), "path", array()), "html", null, true);
             echo "\">\n                            </a>\n                        ";
         }
         // line 14
         echo "                    </div>\n                    <div class=\"col-md-6 col-lg-8\">\n                        <p>";
         // line 16
         echo twig_escape_filter($this->env, $this->getAttribute($context["post"], "summary", array()), "html", null, true);
         echo "\n                        </p>\n                        <p>\n                            <time datetime=\"";
         // line 19
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($context["post"], "published_at", array()), "Y-m-d"), "html", null, true);
         echo "\" pubdate><i class=\"fa fa-clock-o\"></i> ";
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($context["post"], "published_at", array()), "M d, Y"), "html", null, true);
         echo "</time>\n                        </p>\n                        <p><a href=\"";
         // line 21
         echo twig_escape_filter($this->env, $this->getAttribute($context["post"], "url", array()), "html", null, true);
         echo "\" class=\"btn btn-primary\">Ler Mais</a></p>\n                    </div>\n                </article>\n            </div>\n            ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 26
         echo "                    <div class=\"container-fluid\">\n                        <h1 class=\"no-data\"><i class=\"fa fa-info-circle fa-2x\" style=\"vertical-align:middle\"></i> ";
         // line 27
         echo twig_escape_filter($this->env, isset($context["noPostsMessage"]) ? $context["noPostsMessage"] : null, "html", null, true);
         echo "</h1>\n                    </div>\n            ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 30
     echo "        </div>\n    </div>\n</section>";
 }
开发者ID:nuieee,项目名称:website,代码行数:50,代码来源:597a2c4fa9eb3fd934a003a639e100c02fee16a34333633c7a2dde1fac34203f.php

示例11: block_article_content

 public function block_article_content($context, array $blocks = array())
 {
     // line 10
     echo "\n    <h2>\n        <a href=\"";
     // line 12
     echo twig_escape_filter($this->env, $this->env->getExtension('slim')->urlFor("article.create"), "html", null, true);
     echo "\">\n            Create new article\n        </a>\n    </h2>\n\n    <hr>\n\n    ";
     // line 19
     if (twig_test_empty(isset($context["blog"]) ? $context["blog"] : null)) {
         // line 20
         echo "        <h1>\n            Nothing to see here\n        </h1>\n    ";
     } else {
         // line 24
         echo "\n        ";
         // line 25
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["blog"]) ? $context["blog"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["blogs"]) {
             // line 26
             echo "\n            <h2>\n                ";
             // line 29
             echo "                <a href=\"";
             echo twig_escape_filter($this->env, $this->env->getExtension('slim')->urlFor("article.show", array("id" => $this->getAttribute($context["blogs"], "id", array()))), "html", null, true);
             echo "\">\n                    ";
             // line 30
             echo twig_escape_filter($this->env, $this->getAttribute($context["blogs"], "title", array()), "html", null, true);
             echo "\n                </a>\n            </h2>\n\n            <p>\n                ";
             // line 36
             echo "                ";
             echo nl2br(twig_escape_filter($this->env, twig_slice($this->env, $this->getAttribute($context["blogs"], "content", array()), 0, 30), "html", null, true));
             echo " ...\n                <a href=\"";
             // line 37
             echo twig_escape_filter($this->env, $this->env->getExtension('slim')->urlFor("article.show", array("id" => $this->getAttribute($context["blogs"], "id", array()))), "html", null, true);
             echo "\">\n                    See more\n                </a>\n            </p>\n\n            <p>\n                ";
             // line 44
             echo "                Created at:\n                ";
             // line 45
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($context["blogs"], "created_at", array()), "diffForHumans", array(), "method"), "html", null, true);
             echo "\n            </p>\n        ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['blogs'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 48
         echo "\n    ";
     }
     // line 50
     echo "\n";
 }
开发者ID:Gaaab,项目名称:sharesomething,代码行数:49,代码来源:599c3771066c3e6dd8e982bbb9fdaad8c9a55a199f45db2e23d43e3752f6334c.php

示例12: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "<div class=\"Menu--dashboard\">\n\n    <ul class=\"Menu-tabList\">\n        ";
     // line 4
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["menu"]) ? $context["menu"] : $this->getContext($context, "menu"));
     foreach ($context['_seq'] as $context["level1"] => $context["level2"]) {
         // line 5
         echo "            <li id=\"";
         echo twig_escape_filter($this->env, call_user_func_array($this->env->getFilter('urlRewriteWithParameters')->getCallable(), array($this->getAttribute(isset($context["level2"]) ? $context["level2"] : $this->getContext($context, "level2"), "_url"))), "html", null, true);
         echo "\">\n                <a href=\"#";
         // line 6
         echo twig_escape_filter($this->env, twig_slice($this->env, call_user_func_array($this->env->getFilter('urlRewriteWithParameters')->getCallable(), array($this->getAttribute(isset($context["level2"]) ? $context["level2"] : $this->getContext($context, "level2"), "_url"))), 1), "html", null, true);
         echo "\"\n                   onclick=\"return piwikMenu.onItemClick(this);\">";
         // line 7
         echo twig_escape_filter($this->env, call_user_func_array($this->env->getFilter('translate')->getCallable(), array(isset($context["level1"]) ? $context["level1"] : $this->getContext($context, "level1"))), "html", null, true);
         echo "</a>\n                <ul>\n                ";
         // line 9
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["level2"]) ? $context["level2"] : $this->getContext($context, "level2"));
         foreach ($context['_seq'] as $context["name"] => $context["urlParameters"]) {
             // line 10
             echo "                    ";
             if (twig_slice($this->env, isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"), 0, 1) != "_") {
                 // line 11
                 echo "                        <li>\n                            <a href='#";
                 // line 12
                 echo twig_escape_filter($this->env, twig_slice($this->env, call_user_func_array($this->env->getFilter('urlRewriteWithParameters')->getCallable(), array($this->getAttribute(isset($context["urlParameters"]) ? $context["urlParameters"] : $this->getContext($context, "urlParameters"), "_url"))), 1), "html", null, true);
                 echo "'\n                               onclick='return piwikMenu.onItemClick(this);'>\n                                ";
                 // line 14
                 echo twig_escape_filter($this->env, call_user_func_array($this->env->getFilter('translate')->getCallable(), array(isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"))), "html", null, true);
                 echo "\n                            </a>\n                        </li>\n                    ";
             }
             // line 18
             echo "                ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['name'], $context['urlParameters'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 19
         echo "                </ul>\n            </li>\n        ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['level1'], $context['level2'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 22
     echo "        <li id=\"Searchmenu\">\n            <span piwik-quick-access></span>\n        </li>\n    </ul>\n\n</div>\n<div class=\"nav_sep\"></div>\n";
 }
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:49,代码来源:25d6a560f0f89ff9735a313b8d5ad65dd2b9649ddde9b900481e012492aa.php

示例13: block_content

 public function block_content($context, array $blocks = array())
 {
     $__internal_67c04cc99c6a0ea55165e0a007911be0e4398f494c91a1900aa07196706e12bf = $this->env->getExtension("native_profiler");
     $__internal_67c04cc99c6a0ea55165e0a007911be0e4398f494c91a1900aa07196706e12bf->enter($__internal_67c04cc99c6a0ea55165e0a007911be0e4398f494c91a1900aa07196706e12bf_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "content"));
     // line 3
     echo "    <h1 class=\"search_header\">Result searching by \"";
     echo twig_escape_filter($this->env, isset($context["search_word"]) ? $context["search_word"] : $this->getContext($context, "search_word"), "html", null, true);
     echo "\":</h1>\n    <ul class=\"post_list\">\n        ";
     // line 5
     if (array_key_exists("posts", $context)) {
         // line 6
         echo "            ";
         $context['_parent'] = $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["posts"]) ? $context["posts"] : $this->getContext($context, "posts"));
         foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
             // line 7
             echo "                <li>\n                    <a href=\"";
             // line 8
             echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("post_show", array("slug" => $this->getAttribute($context["post"], "slug", array()))), "html", null, true);
             echo "\">\n                        <img src=\"";
             // line 9
             echo twig_escape_filter($this->env, $this->getAttribute($context["post"], "img", array()), "html", null, true);
             echo "\" alt=\"";
             echo twig_escape_filter($this->env, twig_slice($this->env, $this->getAttribute($context["post"], "title", array()), 0, 50), "html", null, true);
             echo "\">\n                        <h2>";
             // line 10
             echo twig_escape_filter($this->env, $this->getAttribute($context["post"], "title", array()), "html", null, true);
             echo "</h2>\n                        <div class=\"post_info\">\n                            <span class=\"publish_date\">";
             // line 12
             echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($context["post"], "createdAt", array()), "m/d/Y"), "html", null, true);
             echo "</span>\n                    <span class=\"rate\">\n                    </span>\n                        </div>\n                        <p>";
             // line 16
             echo twig_escape_filter($this->env, twig_slice($this->env, $this->getAttribute($context["post"], "article", array()), 0, 1000), "html", null, true);
             echo "</p>\n                    </a>\n                </li>\n\n            ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 21
         echo "        ";
     } else {
         // line 22
         echo "            <li class=\"no_results\"><h2>No any results..:(</h2></li>\n        ";
     }
     // line 24
     echo "    </ul>\n\n\n";
     $__internal_67c04cc99c6a0ea55165e0a007911be0e4398f494c91a1900aa07196706e12bf->leave($__internal_67c04cc99c6a0ea55165e0a007911be0e4398f494c91a1900aa07196706e12bf_prof);
 }
开发者ID:DenisRupp,项目名称:SymfonyBlogHW7,代码行数:48,代码来源:80029cb56dfe341747d7891ad5dbe34810c8574922f095911d31e0d83a769a77.php

示例14: block_body

 public function block_body($context, array $blocks = array())
 {
     $__internal_904ac88ea4ed5f23329d87969586039f0a16866417774e51f29b3ee5c68dc3f0 = $this->env->getExtension("native_profiler");
     $__internal_904ac88ea4ed5f23329d87969586039f0a16866417774e51f29b3ee5c68dc3f0->enter($__internal_904ac88ea4ed5f23329d87969586039f0a16866417774e51f29b3ee5c68dc3f0_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "body"));
     // line 4
     echo "    <div id=\"wrapper\">\n        <div id=\"container\">\n            <div id=\"welcome\">\n                <h1><span>Welcome to</span> Symfony ";
     // line 7
     echo twig_escape_filter($this->env, twig_constant("Symfony\\Component\\HttpKernel\\Kernel::VERSION"), "html", null, true);
     echo "</h1>\n            </div>\n\n            <div id=\"status\">\n                <p>\n                    <svg id=\"icon-status\" width=\"1792\" height=\"1792\" viewBox=\"0 0 1792 1792\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z\" fill=\"#759E1A\"/></svg>\n\n                    Your application is now ready. You can start working on it at:\n                    <code>";
     // line 15
     echo twig_escape_filter($this->env, isset($context["base_dir"]) ? $context["base_dir"] : $this->getContext($context, "base_dir"), "html", null, true);
     echo "</code>\n                </p>\n            </div>\n\n            <div id=\"next\">\n                <h2>What's next?</h2>\n                <p>\n                    <svg id=\"icon-book\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewBox=\"-12.5 9 64 64\" enable-background=\"new -12.5 9 64 64\" xml:space=\"preserve\">\n                        <path fill=\"#AAA\" d=\"M6.8,40.8c2.4,0.8,4.5-0.7,4.9-2.5c0.2-1.2-0.3-2.1-1.3-3.2l-0.8-0.8c-0.4-0.5-0.6-1.3-0.2-1.9\n                            c0.4-0.5,0.9-0.8,1.8-0.5c1.3,0.4,1.9,1.3,2.9,2.2c-0.4,1.4-0.7,2.9-0.9,4.2l-0.2,1c-0.7,4-1.3,6.2-2.7,7.5\n                            c-0.3,0.3-0.7,0.5-1.3,0.6c-0.3,0-0.4-0.3-0.4-0.3c0-0.3,0.2-0.3,0.3-0.4c0.2-0.1,0.5-0.3,0.4-0.8c0-0.7-0.6-1.3-1.3-1.3\n                            c-0.6,0-1.4,0.6-1.4,1.7s1,1.9,2.4,1.8c0.8,0,2.5-0.3,4.2-2.5c2-2.5,2.5-5.4,2.9-7.4l0.5-2.8c0.3,0,0.5,0.1,0.8,0.1\n                            c2.4,0.1,3.7-1.3,3.7-2.3c0-0.6-0.3-1.2-0.9-1.2c-0.4,0-0.8,0.3-1,0.8c-0.1,0.6,0.8,1.1,0.1,1.5c-0.5,0.3-1.4,0.6-2.7,0.4l0.3-1.3\n                            c0.5-2.6,1-5.7,3.2-5.8c0.2,0,0.8,0,0.8,0.4c0,0.2,0,0.2-0.2,0.5c-0.2,0.3-0.3,0.4-0.2,0.7c0,0.7,0.5,1.1,1.2,1.1\n                            c0.9,0,1.2-1,1.2-1.4c0-1.2-1.2-1.8-2.6-1.8c-1.5,0.1-2.8,0.9-3.7,2.1c-1.1,1.3-1.8,2.9-2.3,4.5c-0.9-0.8-1.6-1.8-3.1-2.3\n                            c-1.1-0.7-2.3-0.5-3.4,0.3c-0.5,0.4-0.8,1-1,1.6c-0.4,1.5,0.4,2.9,0.8,3.4l0.9,1c0.2,0.2,0.6,0.8,0.4,1.5c-0.3,0.8-1.2,1.3-2.1,1\n                            c-0.4-0.2-1-0.5-0.9-0.9c0.1-0.2,0.2-0.3,0.3-0.5s0.1-0.3,0.1-0.3c0.2-0.6-0.1-1.4-0.7-1.6c-0.6-0.2-1.2,0-1.3,0.8\n                            C4.3,38.4,4.7,40,6.8,40.8z M46.1,20.9c0-4.2-3.2-7.5-7.1-7.5h-3.8C34.8,10.8,32.7,9,30.2,9L-2.3,9.1c-2.8,0.1-4.9,2.4-4.9,5.4\n                            L-7,58.6c0,4.8,8.1,13.9,11.6,14.1l34.7-0.1c3.9,0,7-3.4,7-7.6L46.1,20.9z M-0.3,36.4c0-8.6,6.5-15.6,14.5-15.6\n                            c8,0,14.5,7,14.5,15.6S22.1,52,14.2,52C6.1,52-0.3,45-0.3,36.4z M42.1,65.1c0,1.8-1.5,3.1-3.1,3.1H4.6c-0.7,0-3-1.8-4.5-4.4h30.4\n                            c2.8,0,5-2.4,5-5.4V17.9h3.7c1.6,0,2.9,1.4,2.9,3.1V65.1L42.1,65.1z\"/>\n                    </svg>\n\n                    Read the documentation to learn\n                    <a href=\"http://symfony.com/doc/";
     // line 39
     echo twig_escape_filter($this->env, twig_slice($this->env, twig_constant("Symfony\\Component\\HttpKernel\\Kernel::VERSION"), 0, 3), "html", null, true);
     echo "/book/page_creation.html\">\n                        How to create your first page in Symfony\n                    </a>\n                </p>\n            </div>\n\n        </div>\n    </div>\n";
     $__internal_904ac88ea4ed5f23329d87969586039f0a16866417774e51f29b3ee5c68dc3f0->leave($__internal_904ac88ea4ed5f23329d87969586039f0a16866417774e51f29b3ee5c68dc3f0_prof);
 }
开发者ID:kibimimi,项目名称:monprojettest,代码行数:17,代码来源:bf061a7dbf5c69c1d97c51d303a1885ec856deb6cefa9fa9b7b30786d31aa029.php

示例15: block_content

 public function block_content($context, array $blocks = array())
 {
     $__internal_202ec106cd037e593d038c3598df17fb1be9607e9182cc6f12c148c33c566553 = $this->env->getExtension("native_profiler");
     $__internal_202ec106cd037e593d038c3598df17fb1be9607e9182cc6f12c148c33c566553->enter($__internal_202ec106cd037e593d038c3598df17fb1be9607e9182cc6f12c148c33c566553_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "content"));
     // line 3
     echo "<ul class=\"post_list\">\n    ";
     // line 4
     $context['_parent'] = $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["posts"]) ? $context["posts"] : $this->getContext($context, "posts"));
     foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
         // line 5
         echo "        <li>\n                <img src=\"";
         // line 6
         echo twig_escape_filter($this->env, $this->getAttribute($context["post"], "img", array()), "html", null, true);
         echo "\" alt=\"";
         echo twig_escape_filter($this->env, twig_slice($this->env, $this->getAttribute($context["post"], "title", array()), 0, 50), "html", null, true);
         echo "\">\n                <h2>";
         // line 7
         echo twig_escape_filter($this->env, $this->getAttribute($context["post"], "title", array()), "html", null, true);
         echo "</h2>\n                <div class=\"post_info\">\n                    <span class=\"publish_date\">";
         // line 9
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($context["post"], "createdAt", array()), "m/d/Y"), "html", null, true);
         echo "</span>\n                    <span class=\"rate\">\n                       ";
         // line 18
         echo "                    </span>\n                </div>\n                <p>";
         // line 20
         echo twig_escape_filter($this->env, twig_slice($this->env, $this->getAttribute($context["post"], "article", array()), 0, 1000), "html", null, true);
         echo "</p>\n                <a  class=\"read_more\" href=\"";
         // line 21
         echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("post_show", array("slug" => $this->getAttribute($context["post"], "slug", array()))), "html", null, true);
         echo "\">Read more\n                </a>\n        </li>\n\n        ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 26
     echo "</ul>\n    <div>SEE MORE</div>\n\n";
     $__internal_202ec106cd037e593d038c3598df17fb1be9607e9182cc6f12c148c33c566553->leave($__internal_202ec106cd037e593d038c3598df17fb1be9607e9182cc6f12c148c33c566553_prof);
 }
开发者ID:DenisRupp,项目名称:SymfonyBlogHW7,代码行数:39,代码来源:3b7f3a3a358c64c6e1cbdcb05fa410456a07c5252c22753fea1083aa9dd0690c.php


注:本文中的twig_slice函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。