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


PHP twig_last函数代码示例

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


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

示例1: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     $context["updates"] = $this->getAttribute($this->getAttribute(isset($context["gantry"]) ? $context["gantry"] : null, "platform", array()), "updates", array());
     // line 2
     if (isset($context["updates"]) ? $context["updates"] : null) {
         // line 3
         $context["version"] = twig_last($this->env, twig_split_filter($this->env, $this->getAttribute(isset($context["updates"]) ? $context["updates"] : null, 0, array()), " "));
         // line 4
         echo "<div class=\"g-grid\">\n    <div class=\"g-block\">\n        <div class=\"update-header clearfix\">\n            <span class=\"update-text\">";
         // line 7
         echo twig_escape_filter($this->env, $this->env->getExtension('GantryTwig')->transFilter("GANTRY5_PLATFORM_UPDATES_AVAILABLE"), "html", null, true);
         echo ": ";
         echo twig_escape_filter($this->env, twig_join_filter(isset($context["updates"]) ? $context["updates"] : null, ", "), "html", null, true);
         echo "</span>\n            <div class=\"update-tools\">\n                <a href=\"";
         // line 9
         echo $this->getAttribute($this->getAttribute(isset($context["gantry"]) ? $context["gantry"] : null, "platform", array()), "update", array());
         echo "\" class=\"button button-update\"><i class=\"fa fa-refresh\"></i> <span>";
         echo twig_escape_filter($this->env, $this->env->getExtension('GantryTwig')->transFilter("GANTRY5_PLATFORM_UPDATE"), "html", null, true);
         echo "</span></a>\n                <a href=\"#\" data-changelog=\"";
         // line 10
         echo twig_escape_filter($this->env, isset($context["version"]) ? $context["version"] : null, "html", null, true);
         echo "\" class=\"button button-update\"><i class=\"fa fa-book\"></i> <span>";
         echo twig_escape_filter($this->env, $this->env->getExtension('GantryTwig')->transFilter("GANTRY5_PLATFORM_CHANGELOG"), "html", null, true);
         echo "</span></a>\n                <a href=\"#\" class=\"fa fa-close\" data-g-close=\".g-grid\"></a>\n            </div>\n        </div>\n    </div>\n</div>\n";
     }
 }
开发者ID:JozefAB,项目名称:neoacu,代码行数:27,代码来源:5898ef490d6dd8931038dda7d87af6a7a0c7f4220d4205490120da11f9e53839.php

示例2: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     if (array_key_exists("entities", $context)) {
         // line 2
         echo "    <header>نتایج جستجو برای: ";
         echo twig_escape_filter($this->env, isset($context["query"]) ? $context["query"] : $this->getContext($context, "query"), "html", null, true);
         echo "</header>\n    ";
         // line 3
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["entities"]) ? $context["entities"] : $this->getContext($context, "entities"));
         foreach ($context['_seq'] as $context["_key"] => $context["book"]) {
             // line 4
             echo "    <article id=\"book\">\n            <figure>\n                ";
             // line 6
             $context["cover"] = twig_last($this->env, twig_split_filter($this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "cover"), "/"));
             echo "            \n                ";
             // line 8
             echo "                <img src=\"";
             echo twig_escape_filter($this->env, $this->env->getExtension('liip_imagine')->filter(twig_join_filter(array(0 => "uploads/", 1 => isset($context["cover"]) ? $context["cover"] : $this->getContext($context, "cover"))), "my_thumb", true), "html", null, true);
             echo "\" />\n            </figure>\n            <figcaption>            \n                <div id=\"comments_num\" title=\"";
             // line 11
             if ($this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "commentNum")) {
                 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "commentNum"), "html", null, true);
                 echo " دیدگاه";
             } else {
                 echo "بدون دیدگاه";
             }
             echo "\"><h3>";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "commentNum"), "html", null, true);
             echo "</h3></div>\n                <a href=\"";
             // line 12
             echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_show", array("id" => $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "link"))), "html", null, true);
             echo "\"><h1>";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "name"), "html", null, true);
             echo "</h1></a>\n                <h3>";
             // line 13
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "author"), "html", null, true);
             echo "</h3>\n                <a href=\"";
             // line 14
             echo twig_escape_filter($this->env, twig_join_filter(array(0 => "uploads/", 1 => $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "file"))), "html", null, true);
             echo "\"><button type=\"button\" class=\"btn btn-info\">دریافت</button></a>\n            </figcaption>\n    </article>    \n    ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['book'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 18
         echo "    <div id=\"clr\"></div>\n    ";
         // line 19
         echo $this->env->getExtension('knp_pagination')->render(isset($context["entities"]) ? $context["entities"] : $this->getContext($context, "entities"));
         echo "\n";
     } else {
         // line 21
         echo "    ";
         $this->env->loadTemplate("ChakoshHomeBundle:Home:noresult_content.html.twig")->display($context);
     }
     // line 23
     echo "\n";
 }
开发者ID:amirmasoud,项目名称:symfony-bookstore,代码行数:59,代码来源:d75ce510930a64e6bfa65329e17967186db85b69dc713f9b24aa4cfa7fc1.php

示例3: block_content

 public function block_content($context, array $blocks = array())
 {
     // line 3
     if (array_key_exists("category", $context)) {
         echo "<header><span class=\"glyphicon glyphicon-briefcase\"></span> آرشیو دسته ی: ";
         echo twig_escape_filter($this->env, isset($context["category"]) ? $context["category"] : $this->getContext($context, "category"), "html", null, true);
         echo "</header>";
     }
     // line 4
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["entities"]) ? $context["entities"] : $this->getContext($context, "entities"));
     foreach ($context['_seq'] as $context["_key"] => $context["book"]) {
         // line 5
         echo "<article id=\"book\">\n        <figure>\n            ";
         // line 7
         $context["cover"] = twig_last($this->env, twig_split_filter($this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "cover"), "/"));
         // line 8
         echo "            ";
         // line 9
         echo "            <img src=\"";
         echo twig_escape_filter($this->env, $this->env->getExtension('liip_imagine')->filter(twig_join_filter(array(0 => "uploads/", 1 => isset($context["cover"]) ? $context["cover"] : $this->getContext($context, "cover"))), "my_thumb", true), "html", null, true);
         echo "\" />\n        </figure>\n        <figcaption>            \n            <div id=\"comments_num\" title=\"";
         // line 12
         if ($this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "commentNum")) {
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "commentNum"), "html", null, true);
             echo " دیدگاه";
         } else {
             echo "بدون دیدگاه";
         }
         echo "\"><h3>";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "commentNum"), "html", null, true);
         echo "</h3></div>\n            <a href=\"";
         // line 13
         echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_show", array("id" => $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "link"))), "html", null, true);
         echo "\"><h1>";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "name"), "html", null, true);
         echo "</h1></a>\n            <h3>";
         // line 14
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "author"), "html", null, true);
         echo "</h3>\n            <a href=\"";
         // line 15
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "file"), "html", null, true);
         echo "\"><button type=\"button\" class=\"btn btn-info\">دریافت</button></a>\n        </figcaption>\n</article>    \n";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['book'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 19
     echo "<div id=\"clr\"></div>\n";
     // line 20
     echo $this->env->getExtension('knp_pagination')->render(isset($context["entities"]) ? $context["entities"] : $this->getContext($context, "entities"));
     echo "\n<script type=\"text/javascript\">\n\n</script>\n";
 }
开发者ID:amirmasoud,项目名称:symfony-bookstore,代码行数:53,代码来源:80fed850e713adc17dd442ccb6d602a431ce026ba909c9a4d7f1c017d946.php

示例4: block_content

 public function block_content($context, array $blocks = array())
 {
     // line 50
     echo "    <header>\n        <h3>";
     // line 51
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "name"), "html", null, true);
     echo "</h3>\n        <h3> | </h3>\n        <h3>";
     // line 53
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "author"), "html", null, true);
     echo "</h3>\n        <div id=\"category\">\n        ";
     // line 55
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["category"]) ? $context["category"] : $this->getContext($context, "category"));
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["_key"] => $context["cat"]) {
         // line 56
         echo "        <a href=\"";
         echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("category_show", array("category" => $this->getAttribute(isset($context["cat"]) ? $context["cat"] : $this->getContext($context, "cat"), "name"))), "html", null, true);
         echo "\">\n            <span class=\"label label-success\">";
         // line 57
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["cat"]) ? $context["cat"] : $this->getContext($context, "cat"), "name"), "html", null, true);
         echo "</span>\n        </a>\n        ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 60
         echo "            <span class=\"label label-success\">دسته بندی نشده</span>\n        ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['cat'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 62
     echo "        </div>\n    </header>\n    <a class=\"image-popup-no-margins\" href=\"";
     // line 64
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "cover"), "html", null, true);
     echo "\">\n        <div id=\"cover_image\">\n            <figure id=\"single\">\n                ";
     // line 67
     $context["cover"] = twig_last($this->env, twig_split_filter($this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "cover"), "/"));
     // line 68
     echo "                <img src=\"";
     echo twig_escape_filter($this->env, $this->env->getExtension('liip_imagine')->filter(twig_join_filter(array(0 => "uploads/", 1 => isset($context["cover"]) ? $context["cover"] : $this->getContext($context, "cover"))), "my_thumb"), "html", null, true);
     echo "\" />\n                <div id=\"download\">\n                    <a href=\"";
     // line 70
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "file"), "html", null, true);
     echo "\"><button type=\"submit\" class=\"btn btn-info\" />دریافت</button></a>\n                </div>\n            </figure>\n        </div>    \n    </a>\n    \n    <footer id=\"single-footer\">        \n        <p>";
     // line 77
     echo $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "content");
     echo "</p>\n    </footer>\n    <div id=\"clr\"></div>\n    ";
     // line 80
     $this->env->loadTemplate("ChakoshHomeBundle:Base:comments.html.twig")->display(array_merge($context, isset($context["comment"]) ? $context["comment"] : $this->getContext($context, "comment")));
 }
开发者ID:amirmasoud,项目名称:symfony-bookstore,代码行数:51,代码来源:3e132825bcfbab2fd51b3af26c6d704fbcfbd23720c2b31dc33f0fa1a8a1.php

示例5: block_content

 public function block_content($context, array $blocks = array())
 {
     // line 3
     echo "<section class=\"row\">\n    <div class=\"col-md-3\">\n    </div>\n    <div class=\"col-md-3\"></div>\n    <div class=\"col-md-3\"></div>\n    <div class=\"col-md-3\">\n        <a href=\"";
     // line 9
     echo $this->env->getExtension('routing')->getPath("admin_new");
     echo "\"><button type=\"button\" class=\"btn btn-primary\"><span class=\"fa-plus\"></span> جدید</button></a>\n    </div>\n</section>\n<section>\n    <table class=\"table\">\n        <thead>\n            <tr>\n                <th>کاور</th>\n                <th>دیدگاه</th>\n                <th>نام</th>\n                <th>نویسنده</th>\n            </tr>\n        </thead>\n        <tbody>\n        ";
     // line 23
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["entities"]) ? $context["entities"] : $this->getContext($context, "entities"));
     foreach ($context['_seq'] as $context["_key"] => $context["book"]) {
         // line 24
         echo "        ";
         $context["cover"] = twig_last($this->env, twig_split_filter($this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "cover"), "/"));
         // line 25
         echo "            <tr>\n                <td><img src=\"";
         // line 26
         echo twig_escape_filter($this->env, $this->env->getExtension('liip_imagine')->filter(twig_join_filter(array(0 => "uploads/", 1 => isset($context["cover"]) ? $context["cover"] : $this->getContext($context, "cover"))), "small", true), "html", null, true);
         echo "\" /></td>\n                <td>";
         // line 27
         if ($this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "commentNum")) {
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "commentNum"), "html", null, true);
             echo " دیدگاه";
         } else {
             echo "بدون دیدگاه";
         }
         echo "</td>\n                <td><a href=\"";
         // line 28
         echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("admin_edit", array("id" => $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "id"))), "html", null, true);
         echo "\">";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "name"), "html", null, true);
         echo "</a></td>\n                <td>";
         // line 29
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["book"]) ? $context["book"] : $this->getContext($context, "book"), "author"), "html", null, true);
         echo "</td>\n            </tr>\n        ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['book'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 32
     echo "        </tbody>\n    </table>\n</section>\n";
     // line 35
     echo $this->env->getExtension('knp_pagination')->render(isset($context["entities"]) ? $context["entities"] : $this->getContext($context, "entities"));
     echo "\n";
 }
开发者ID:amirmasoud,项目名称:symfony-bookstore,代码行数:45,代码来源:acaa177ecd9d5c4a875a879f655b6176016182c11f7108e195b19e54d3d4.php

示例6: block_page_content

 public function block_page_content($context, array $blocks = array())
 {
     // line 20
     echo "\n    <div class=\"page-header\">\n        <h1>";
     // line 22
     echo twig_escape_filter($this->env, twig_last($this->env, twig_split_filter($this->env, $this->getAttribute(isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"), "name", array()), "\\")), "html", null, true);
     echo "</h1>\n        <span class=\"pull-right>Edit ";
     // line 23
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"), "name", array()), "html", null, true);
     echo "</span>\n    </div>\n\n    <p>";
     // line 26
     $this->displayBlock("class_signature", $context, $blocks);
     echo "</p>\n\n    ";
     // line 28
     if ($this->getAttribute(isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"), "shortdesc", array()) || $this->getAttribute(isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"), "longdesc", array())) {
         // line 29
         echo "        <div class=\"description\">\n            ";
         // line 30
         if ($this->getAttribute(isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"), "shortdesc", array())) {
             // line 31
             echo "<p>";
             echo $this->env->getExtension('sami')->parseDesc($context, $this->getAttribute(isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"), "shortdesc", array()), isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"));
             echo "</p>";
         }
         // line 33
         echo "            ";
         if ($this->getAttribute(isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"), "longdesc", array())) {
             // line 34
             echo "<p>";
             echo $this->env->getExtension('sami')->parseDesc($context, $this->getAttribute(isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"), "longdesc", array()), isset($context["class"]) ? $context["class"] : $this->getContext($context, "class"));
             echo "</p>";
         }
         // line 36
         echo "        </div>\n    ";
     }
     // line 38
     echo "\n    ";
     // line 39
     if (isset($context["traits"]) ? $context["traits"] : $this->getContext($context, "traits")) {
         // line 40
         echo "        <h2>Traits</h2>\n\n        ";
         // line 42
         echo $context["__internal_7d195477799f982fd3814126484790b95253529c17cb67f66e9c4004134f5530"]->getrender_classes(isset($context["traits"]) ? $context["traits"] : $this->getContext($context, "traits"));
         echo "\n    ";
     }
     // line 44
     echo "\n    ";
     // line 45
     if (isset($context["constants"]) ? $context["constants"] : $this->getContext($context, "constants")) {
         // line 46
         echo "        <h2>Constants</h2>\n\n        ";
         // line 48
         $this->displayBlock("constants", $context, $blocks);
         echo "\n    ";
     }
     // line 50
     echo "\n    ";
     // line 51
     if (isset($context["properties"]) ? $context["properties"] : $this->getContext($context, "properties")) {
         // line 52
         echo "        <h2>Properties</h2>\n\n        ";
         // line 54
         $this->displayBlock("properties", $context, $blocks);
         echo "\n    ";
     }
     // line 56
     echo "\n    ";
     // line 57
     if (isset($context["methods"]) ? $context["methods"] : $this->getContext($context, "methods")) {
         // line 58
         echo "        <h2>Methods</h2>\n\n        ";
         // line 60
         $this->displayBlock("methods", $context, $blocks);
         echo "\n\n        <h2>Details</h2>\n\n        ";
         // line 64
         $this->displayBlock("methods_details", $context, $blocks);
         echo "\n    ";
     }
     // line 66
     echo "\n";
 }
开发者ID:getgrav,项目名称:grav-api,代码行数:81,代码来源:338b04d68ce2b4d23efb7ecfe8a1af05922d3904a3b959b0af2c650a745d.php

示例7: getrender_log_message

 public function getrender_log_message($__log_index__ = null, $__log__ = null, $__is_deprecation__ = false)
 {
     $context = $this->env->mergeGlobals(array("log_index" => $__log_index__, "log" => $__log__, "is_deprecation" => $__is_deprecation__, "varargs" => func_num_args() > 3 ? array_slice(func_get_args(), 3) : array()));
     $blocks = array();
     ob_start();
     try {
         $__internal_07f279c7df176c5a3e1446c7bd0bb83a9454032563e18984a59759be11176211 = $this->env->getExtension("native_profiler");
         $__internal_07f279c7df176c5a3e1446c7bd0bb83a9454032563e18984a59759be11176211->enter($__internal_07f279c7df176c5a3e1446c7bd0bb83a9454032563e18984a59759be11176211_prof = new Twig_Profiler_Profile($this->getTemplateName(), "macro", "render_log_message"));
         // line 171
         echo "    ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["log"]) ? $context["log"] : $this->getContext($context, "log"), "message", array()), "html", null, true);
         echo "\n\n    ";
         // line 173
         if (isset($context["is_deprecation"]) ? $context["is_deprecation"] : $this->getContext($context, "is_deprecation")) {
             // line 174
             echo "        ";
             $context["stack"] = $this->getAttribute($this->getAttribute(isset($context["log"]) ? $context["log"] : null, "context", array(), "any", false, true), "stack", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($this->getAttribute(isset($context["log"]) ? $context["log"] : null, "context", array(), "any", false, true), "stack", array()), array()) : array();
             // line 175
             echo "        ";
             $context["id"] = "sf-call-stack-" . (isset($context["log_index"]) ? $context["log_index"] : $this->getContext($context, "log_index"));
             // line 176
             echo "\n        ";
             // line 177
             if ($this->getAttribute($this->getAttribute(isset($context["log"]) ? $context["log"] : null, "context", array(), "any", false, true), "errorCount", array(), "any", true, true)) {
                 // line 178
                 echo "            <span class=\"text-small text-bold\">(";
                 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["log"]) ? $context["log"] : $this->getContext($context, "log"), "context", array()), "errorCount", array()), "html", null, true);
                 echo " times)</span>\n        ";
             }
             // line 180
             echo "\n        ";
             // line 181
             if (isset($context["stack"]) ? $context["stack"] : $this->getContext($context, "stack")) {
                 // line 182
                 echo "            <button class=\"btn-link text-small sf-toggle\" data-toggle-selector=\"#";
                 echo twig_escape_filter($this->env, isset($context["id"]) ? $context["id"] : $this->getContext($context, "id"), "html", null, true);
                 echo "\" data-toggle-alt-content=\"Hide stack trace\">Show stack trace</button>\n        ";
             }
             // line 184
             echo "\n        ";
             // line 185
             $context['_parent'] = $context;
             $context['_seq'] = twig_ensure_traversable(isset($context["stack"]) ? $context["stack"] : $this->getContext($context, "stack"));
             foreach ($context['_seq'] as $context["index"] => $context["call"]) {
                 if ($context["index"] > 1) {
                     // line 186
                     echo "            ";
                     if ($context["index"] == 2) {
                         // line 187
                         echo "                <ul class=\"sf-call-stack hidden\" id=\"";
                         echo twig_escape_filter($this->env, isset($context["id"]) ? $context["id"] : $this->getContext($context, "id"), "html", null, true);
                         echo "\">\n            ";
                     }
                     // line 189
                     echo "\n            ";
                     // line 190
                     if ($this->getAttribute($context["call"], "class", array(), "any", true, true)) {
                         // line 191
                         echo "                ";
                         $context["from"] = $this->env->getExtension('code')->abbrClass($this->getAttribute($context["call"], "class", array())) . "::" . $this->env->getExtension('code')->abbrMethod($this->getAttribute($context["call"], "function", array()));
                         // line 192
                         echo "            ";
                     } elseif ($this->getAttribute($context["call"], "function", array(), "any", true, true)) {
                         // line 193
                         echo "                ";
                         $context["from"] = $this->env->getExtension('code')->abbrMethod($this->getAttribute($context["call"], "function", array()));
                         // line 194
                         echo "            ";
                     } elseif ($this->getAttribute($context["call"], "file", array(), "any", true, true)) {
                         // line 195
                         echo "                ";
                         $context["from"] = $this->getAttribute($context["call"], "file", array());
                         // line 196
                         echo "            ";
                     } else {
                         // line 197
                         echo "                ";
                         $context["from"] = "-";
                         // line 198
                         echo "            ";
                     }
                     // line 199
                     echo "\n            ";
                     // line 200
                     $context["file_name"] = $this->getAttribute($context["call"], "file", array(), "any", true, true) && $this->getAttribute($context["call"], "line", array(), "any", true, true) ? twig_last($this->env, twig_split_filter($this->env, twig_replace_filter($this->getAttribute($context["call"], "file", array()), array("\\" => "/")), "/")) : "";
                     // line 201
                     echo "\n            <li>\n                ";
                     // line 203
                     echo isset($context["from"]) ? $context["from"] : $this->getContext($context, "from");
                     echo "\n                ";
                     // line 204
                     if (isset($context["file_name"]) ? $context["file_name"] : $this->getContext($context, "file_name")) {
                         // line 205
                         echo "                    <span class=\"text-small\">(called from ";
                         echo $this->env->getExtension('code')->formatFile($this->getAttribute($context["call"], "file", array()), $this->getAttribute($context["call"], "line", array()), isset($context["file_name"]) ? $context["file_name"] : $this->getContext($context, "file_name"));
                         echo ")</span>\n                ";
                     }
                     // line 207
                     echo "            </li>\n\n            ";
                     // line 209
//.........这里部分代码省略.........
开发者ID:karolskora1993,项目名称:strona-przedszkola,代码行数:101,代码来源:98646ee86dd19a8324b3a6c911f8983991eaf258960e6766fcd57b79dd9ed162.php

示例8: testTwigLast

 public function testTwigLast()
 {
     $twig = new Twig_Environment($this->getMock('Twig_LoaderInterface'));
     $this->assertEquals('c', twig_last($twig, 'abc'));
     $this->assertEquals(3, twig_last($twig, array(1, 2, 3)));
     $this->assertSame('', twig_last($twig, null));
     $this->assertSame('', twig_last($twig, ''));
 }
开发者ID:Aryellix,项目名称:scrumator,代码行数:8,代码来源:CoreTest.php

示例9: getrender_log_message

 public function getrender_log_message($__log_index__ = null, $__log__ = null, $__is_deprecation__ = false, ...$__varargs__)
 {
     $context = $this->env->mergeGlobals(array("log_index" => $__log_index__, "log" => $__log__, "is_deprecation" => $__is_deprecation__, "varargs" => $__varargs__));
     $blocks = array();
     ob_start();
     try {
         $__internal_e3a48ea477df3582fb835c64ca25d824bd73bf29514a037d20987c514445ba1d = $this->env->getExtension("native_profiler");
         $__internal_e3a48ea477df3582fb835c64ca25d824bd73bf29514a037d20987c514445ba1d->enter($__internal_e3a48ea477df3582fb835c64ca25d824bd73bf29514a037d20987c514445ba1d_prof = new Twig_Profiler_Profile($this->getTemplateName(), "macro", "render_log_message"));
         // line 154
         echo "    ";
         echo twig_escape_filter($this->env, twig_template_get_attributes($this, isset($context["log"]) ? $context["log"] : $this->getContext($context, "log"), "message", array()), "html", null, true);
         echo "\n\n    ";
         // line 156
         if (isset($context["is_deprecation"]) ? $context["is_deprecation"] : $this->getContext($context, "is_deprecation")) {
             // line 157
             echo "        ";
             $context["stack"] = twig_template_get_attributes($this, twig_template_get_attributes($this, isset($context["log"]) ? $context["log"] : null, "context", array(), "any", false, true), "stack", array(), "any", true, true) ? _twig_default_filter(twig_template_get_attributes($this, twig_template_get_attributes($this, isset($context["log"]) ? $context["log"] : null, "context", array(), "any", false, true), "stack", array()), array()) : array();
             // line 158
             echo "        ";
             $context["id"] = "sf-call-stack-" . (isset($context["log_index"]) ? $context["log_index"] : $this->getContext($context, "log_index"));
             // line 159
             echo "\n        ";
             // line 160
             if (twig_template_get_attributes($this, twig_template_get_attributes($this, isset($context["log"]) ? $context["log"] : null, "context", array(), "any", false, true), "errorCount", array(), "any", true, true)) {
                 // line 161
                 echo "            <span class=\"text-small text-bold\">(";
                 echo twig_escape_filter($this->env, twig_template_get_attributes($this, twig_template_get_attributes($this, isset($context["log"]) ? $context["log"] : $this->getContext($context, "log"), "context", array()), "errorCount", array()), "html", null, true);
                 echo " times)</span>\n        ";
             }
             // line 163
             echo "\n        ";
             // line 164
             if (isset($context["stack"]) ? $context["stack"] : $this->getContext($context, "stack")) {
                 // line 165
                 echo "            <button class=\"btn-link text-small sf-toggle\" data-toggle-selector=\"#";
                 echo twig_escape_filter($this->env, isset($context["id"]) ? $context["id"] : $this->getContext($context, "id"), "html", null, true);
                 echo "\" data-toggle-alt-content=\"Hide stack trace\">Show stack trace</button>\n        ";
             }
             // line 167
             echo "\n        ";
             // line 168
             $context['_parent'] = $context;
             $context['_seq'] = twig_ensure_traversable(isset($context["stack"]) ? $context["stack"] : $this->getContext($context, "stack"));
             foreach ($context['_seq'] as $context["index"] => $context["call"]) {
                 if ($context["index"] > 1) {
                     // line 169
                     echo "            ";
                     if ($context["index"] == 2) {
                         // line 170
                         echo "                <ul class=\"sf-call-stack\" id=\"";
                         echo twig_escape_filter($this->env, isset($context["id"]) ? $context["id"] : $this->getContext($context, "id"), "html", null, true);
                         echo "\" class=\"hidden\">\n            ";
                     }
                     // line 172
                     echo "\n            ";
                     // line 173
                     if (twig_template_get_attributes($this, $context["call"], "class", array(), "any", true, true)) {
                         // line 174
                         echo "                ";
                         $context["from"] = $this->env->getExtension('code')->abbrClass(twig_template_get_attributes($this, $context["call"], "class", array())) . "::" . $this->env->getExtension('code')->abbrMethod(twig_template_get_attributes($this, $context["call"], "function", array()));
                         // line 175
                         echo "            ";
                     } elseif (twig_template_get_attributes($this, $context["call"], "function", array(), "any", true, true)) {
                         // line 176
                         echo "                ";
                         $context["from"] = $this->env->getExtension('code')->abbrMethod(twig_template_get_attributes($this, $context["call"], "function", array()));
                         // line 177
                         echo "            ";
                     } elseif (twig_template_get_attributes($this, $context["call"], "file", array(), "any", true, true)) {
                         // line 178
                         echo "                ";
                         $context["from"] = twig_template_get_attributes($this, $context["call"], "file", array());
                         // line 179
                         echo "            ";
                     } else {
                         // line 180
                         echo "                ";
                         $context["from"] = "-";
                         // line 181
                         echo "            ";
                     }
                     // line 182
                     echo "\n            ";
                     // line 183
                     $context["file_name"] = twig_template_get_attributes($this, $context["call"], "file", array(), "any", true, true) && twig_template_get_attributes($this, $context["call"], "line", array(), "any", true, true) ? twig_last($this->env, twig_split_filter($this->env, twig_replace_filter(twig_template_get_attributes($this, $context["call"], "file", array()), array("\\" => "/")), "/")) : "";
                     // line 184
                     echo "\n            <li>\n                ";
                     // line 186
                     echo isset($context["from"]) ? $context["from"] : $this->getContext($context, "from");
                     echo "\n                ";
                     // line 187
                     if (isset($context["file_name"]) ? $context["file_name"] : $this->getContext($context, "file_name")) {
                         // line 188
                         echo "                    <span class=\"text-small\">(called from ";
                         echo $this->env->getExtension('code')->formatFile(twig_template_get_attributes($this, $context["call"], "file", array()), twig_template_get_attributes($this, $context["call"], "line", array()), isset($context["file_name"]) ? $context["file_name"] : $this->getContext($context, "file_name"));
                         echo ")</span>\n                ";
                     }
                     // line 190
                     echo "            </li>\n\n            ";
                     // line 192
//.........这里部分代码省略.........
开发者ID:RuntyCybin,项目名称:CProject,代码行数:101,代码来源:cf2d1a7271c66bb550f8bde059353286b4e107bdc2409a2f8e84654bf8192133.php

示例10: testTwigLast

 public function testTwigLast()
 {
     $twig = new Apishka_Templater_Environment($this->createMock('Apishka_Templater_LoaderInterface'));
     $this->assertEquals('c', twig_last($twig, 'abc'));
     $this->assertEquals(3, twig_last($twig, array(1, 2, 3)));
     $this->assertSame('', twig_last($twig, null));
     $this->assertSame('', twig_last($twig, ''));
 }
开发者ID:apishka,项目名称:templater,代码行数:8,代码来源:CoreTest.php

示例11: getform_tree_entry

 public function getform_tree_entry($__name__ = null, $__data__ = null, $__expanded__ = null, ...$__varargs__)
 {
     $context = $this->env->mergeGlobals(array("name" => $__name__, "data" => $__data__, "expanded" => $__expanded__, "varargs" => $__varargs__));
     $blocks = array();
     ob_start();
     try {
         $__internal_b3e87ce6b6f9051b8a6b67333569755de0a3f0bacba73e3eef455932801fb665 = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
         $__internal_b3e87ce6b6f9051b8a6b67333569755de0a3f0bacba73e3eef455932801fb665->enter($__internal_b3e87ce6b6f9051b8a6b67333569755de0a3f0bacba73e3eef455932801fb665_prof = new Twig_Profiler_Profile($this->getTemplateName(), "macro", "form_tree_entry"));
         // line 427
         echo "    ";
         $context["tree"] = $this;
         // line 428
         echo "    <li>\n        <div class=\"tree-inner\" data-tab-target-id=\"";
         // line 429
         echo twig_escape_filter($this->env, $this->getAttribute($context["data"] ?? $this->getContext($context, "data"), "id", array()), "html", null, true);
         echo "-details\">\n            ";
         // line 430
         if ($this->getAttribute($context["data"] ?? null, "errors", array(), "any", true, true) && twig_length_filter($this->env, $this->getAttribute($context["data"] ?? $this->getContext($context, "data"), "errors", array())) > 0) {
             // line 431
             echo "                <div class=\"badge-error\">";
             echo twig_escape_filter($this->env, twig_length_filter($this->env, $this->getAttribute($context["data"] ?? $this->getContext($context, "data"), "errors", array())), "html", null, true);
             echo "</div>\n            ";
         }
         // line 433
         echo "\n            ";
         // line 434
         if (!twig_test_empty($this->getAttribute($context["data"] ?? $this->getContext($context, "data"), "children", array()))) {
             // line 435
             echo "                <a class=\"toggle-button\" data-toggle-target-id=\"";
             echo twig_escape_filter($this->env, $this->getAttribute($context["data"] ?? $this->getContext($context, "data"), "id", array()), "html", null, true);
             echo "-children\" href=\"#\"><span class=\"toggle-icon\"></span></a>\n            ";
         } else {
             // line 437
             echo "                <div class=\"toggle-icon empty\"></div>\n            ";
         }
         // line 439
         echo "\n            ";
         // line 440
         echo twig_escape_filter($this->env, array_key_exists("name", $context) ? _twig_default_filter($context["name"] ?? $this->getContext($context, "name"), "(no name)") : "(no name)", "html", null, true);
         echo " ";
         if ($this->getAttribute($context["data"] ?? null, "type_class", array(), "any", true, true)) {
             echo "[<abbr title=\"";
             echo twig_escape_filter($this->env, $this->getAttribute($context["data"] ?? $this->getContext($context, "data"), "type_class", array()), "html", null, true);
             echo "\">";
             echo twig_escape_filter($this->env, twig_last($this->env, twig_split_filter($this->env, $this->getAttribute($context["data"] ?? $this->getContext($context, "data"), "type_class", array()), "\\")), "html", null, true);
             echo "</abbr>]";
         }
         // line 441
         echo "        </div>\n\n        ";
         // line 443
         if (!twig_test_empty($this->getAttribute($context["data"] ?? $this->getContext($context, "data"), "children", array()))) {
             // line 444
             echo "            <ul id=\"";
             echo twig_escape_filter($this->env, $this->getAttribute($context["data"] ?? $this->getContext($context, "data"), "id", array()), "html", null, true);
             echo "-children\" ";
             if (!($context["expanded"] ?? $this->getContext($context, "expanded"))) {
                 echo "class=\"hidden\"";
             }
             echo ">\n                ";
             // line 445
             $context['_parent'] = $context;
             $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["data"] ?? $this->getContext($context, "data"), "children", array()));
             foreach ($context['_seq'] as $context["childName"] => $context["childData"]) {
                 // line 446
                 echo "                    ";
                 echo $context["tree"]->getform_tree_entry($context["childName"], $context["childData"], false);
                 echo "\n                ";
             }
             $_parent = $context['_parent'];
             unset($context['_seq'], $context['_iterated'], $context['childName'], $context['childData'], $context['_parent'], $context['loop']);
             $context = array_intersect_key($context, $_parent) + $_parent;
             // line 448
             echo "            </ul>\n        ";
         }
         // line 450
         echo "    </li>\n";
         $__internal_b3e87ce6b6f9051b8a6b67333569755de0a3f0bacba73e3eef455932801fb665->leave($__internal_b3e87ce6b6f9051b8a6b67333569755de0a3f0bacba73e3eef455932801fb665_prof);
     } catch (Exception $e) {
         ob_end_clean();
         throw $e;
     } catch (Throwable $e) {
         ob_end_clean();
         throw $e;
     }
     return '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
 }
开发者ID:BarloworldTransport,项目名称:BWTSupportWebTools,代码行数:86,代码来源:ce0fb8451d7c6292ff00560e4536e707551b34f888a21eb9375655e0b3bd9b46.php

示例12: block_vich_file_widget

 public function block_vich_file_widget($context, array $blocks = array())
 {
     // line 344
     ob_start();
     // line 345
     echo "    <div class=\"easyadmin-vich-file\">\n        ";
     // line 346
     if (!twig_test_empty(array_key_exists("download_uri", $context) ? _twig_default_filter(isset($context["download_uri"]) ? $context["download_uri"] : null, "") : "")) {
         // line 347
         echo "            ";
         $context["download_title"] = twig_last($this->env, twig_split_filter($this->env, isset($context["download_uri"]) ? $context["download_uri"] : null, "/")) ? twig_last($this->env, twig_split_filter($this->env, isset($context["download_uri"]) ? $context["download_uri"] : null, "/")) : $this->env->getExtension('translator')->trans("download", array(), "VichUploaderBundle");
         // line 348
         echo "            <a href=\"";
         echo twig_escape_filter($this->env, isset($context["download_uri"]) ? $context["download_uri"] : null, "html", null, true);
         echo "\">";
         echo twig_escape_filter($this->env, isset($context["download_title"]) ? $context["download_title"] : null, "html", null, true);
         echo "</a>\n        ";
     }
     // line 350
     echo "\n        <div class=\"row\">\n            ";
     // line 352
     if ($this->getAttribute(isset($context["form"]) ? $context["form"] : null, "delete", array(), "any", true, true)) {
         // line 353
         echo "            <div class=\"col-sm-3 col-md-2\">\n                ";
         // line 354
         echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute(isset($context["form"]) ? $context["form"] : null, "delete", array()), 'row');
         echo "\n            </div>\n            ";
     }
     // line 357
     echo "            <div class=\"";
     echo $this->getAttribute(isset($context["form"]) ? $context["form"] : null, "delete", array(), "any", true, true) ? "col-sm-9 col-md-10" : "col-sm-12";
     echo "\">\n                ";
     // line 358
     echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute(isset($context["form"]) ? $context["form"] : null, "file", array()), 'widget');
     echo "\n            </div>\n        </div>\n    </div>\n";
     echo trim(preg_replace('/>\\s+</', '><', ob_get_clean()));
 }
开发者ID:karolskora1993,项目名称:strona-przedszkola,代码行数:37,代码来源:9a8e63f95018943b5090a96c6a56b8894a49170923fd2126ba6bb4e1673133ec.php

示例13: getrender_log_message

 public function getrender_log_message($__category__ = null, $__log_index__ = null, $__log__ = null, $__is_deprecation__ = false, ...$__varargs__)
 {
     $context = $this->env->mergeGlobals(array("category" => $__category__, "log_index" => $__log_index__, "log" => $__log__, "is_deprecation" => $__is_deprecation__, "varargs" => $__varargs__));
     $blocks = array();
     ob_start();
     try {
         $__internal_c8b1f47d468c6cff1e9abcde7ed156556ae40151f061cd12ed6abb154ba7188d = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
         $__internal_c8b1f47d468c6cff1e9abcde7ed156556ae40151f061cd12ed6abb154ba7188d->enter($__internal_c8b1f47d468c6cff1e9abcde7ed156556ae40151f061cd12ed6abb154ba7188d_prof = new Twig_Profiler_Profile($this->getTemplateName(), "macro", "render_log_message"));
         // line 171
         echo "    ";
         echo twig_escape_filter($this->env, $this->getAttribute($context["log"] ?? $this->getContext($context, "log"), "message", array()), "html", null, true);
         echo "\n\n    ";
         // line 173
         if ($context["is_deprecation"] ?? $this->getContext($context, "is_deprecation")) {
             // line 174
             echo "        ";
             $context["stack"] = $this->getAttribute($this->getAttribute($context["log"] ?? null, "context", array(), "any", false, true), "stack", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($this->getAttribute($context["log"] ?? null, "context", array(), "any", false, true), "stack", array()), array()) : array();
             // line 175
             echo "        ";
             $context["stack_id"] = "sf-call-stack-" . ($context["category"] ?? $this->getContext($context, "category")) . "-" . ($context["log_index"] ?? $this->getContext($context, "log_index"));
             // line 176
             echo "\n        ";
             // line 177
             if ($this->getAttribute($this->getAttribute($context["log"] ?? null, "context", array(), "any", false, true), "errorCount", array(), "any", true, true)) {
                 // line 178
                 echo "            <span class=\"text-small text-bold\">(";
                 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($context["log"] ?? $this->getContext($context, "log"), "context", array()), "errorCount", array()), "html", null, true);
                 echo " times)</span>\n        ";
             }
             // line 180
             echo "\n        ";
             // line 181
             if ($context["stack"] ?? $this->getContext($context, "stack")) {
                 // line 182
                 echo "            <button class=\"btn-link text-small sf-toggle\" data-toggle-selector=\"#";
                 echo twig_escape_filter($this->env, $context["stack_id"] ?? $this->getContext($context, "stack_id"), "html", null, true);
                 echo "\" data-toggle-alt-content=\"Hide stack trace\">Show stack trace</button>\n        ";
             }
             // line 184
             echo "\n        ";
             // line 185
             $context['_parent'] = $context;
             $context['_seq'] = twig_ensure_traversable($context["stack"] ?? $this->getContext($context, "stack"));
             foreach ($context['_seq'] as $context["index"] => $context["call"]) {
                 if ($context["index"] > 1) {
                     // line 186
                     echo "            ";
                     if ($context["index"] == 2) {
                         // line 187
                         echo "                <ul class=\"sf-call-stack hidden\" id=\"";
                         echo twig_escape_filter($this->env, $context["stack_id"] ?? $this->getContext($context, "stack_id"), "html", null, true);
                         echo "\">\n            ";
                     }
                     // line 189
                     echo "\n            ";
                     // line 190
                     if ($this->getAttribute($context["call"], "class", array(), "any", true, true)) {
                         // line 191
                         echo "                ";
                         $context["from"] = $this->env->getExtension('Symfony\\Bridge\\Twig\\Extension\\CodeExtension')->abbrClass($this->getAttribute($context["call"], "class", array())) . "::" . $this->env->getExtension('Symfony\\Bridge\\Twig\\Extension\\CodeExtension')->abbrMethod($this->getAttribute($context["call"], "function", array()));
                         // line 192
                         echo "            ";
                     } elseif ($this->getAttribute($context["call"], "function", array(), "any", true, true)) {
                         // line 193
                         echo "                ";
                         $context["from"] = $this->env->getExtension('Symfony\\Bridge\\Twig\\Extension\\CodeExtension')->abbrMethod($this->getAttribute($context["call"], "function", array()));
                         // line 194
                         echo "            ";
                     } elseif ($this->getAttribute($context["call"], "file", array(), "any", true, true)) {
                         // line 195
                         echo "                ";
                         $context["from"] = $this->getAttribute($context["call"], "file", array());
                         // line 196
                         echo "            ";
                     } else {
                         // line 197
                         echo "                ";
                         $context["from"] = "-";
                         // line 198
                         echo "            ";
                     }
                     // line 199
                     echo "\n            ";
                     // line 200
                     $context["file_name"] = $this->getAttribute($context["call"], "file", array(), "any", true, true) && $this->getAttribute($context["call"], "line", array(), "any", true, true) ? twig_last($this->env, twig_split_filter($this->env, twig_replace_filter($this->getAttribute($context["call"], "file", array()), array("\\" => "/")), "/")) : "";
                     // line 201
                     echo "\n            <li>\n                ";
                     // line 203
                     echo $context["from"] ?? $this->getContext($context, "from");
                     echo "\n                ";
                     // line 204
                     if ($context["file_name"] ?? $this->getContext($context, "file_name")) {
                         // line 205
                         echo "                    <span class=\"text-small\">(called from ";
                         echo $this->env->getExtension('Symfony\\Bridge\\Twig\\Extension\\CodeExtension')->formatFile($this->getAttribute($context["call"], "file", array()), $this->getAttribute($context["call"], "line", array()), $context["file_name"] ?? $this->getContext($context, "file_name"));
                         echo ")</span>\n                ";
                     }
                     // line 207
                     echo "            </li>\n\n            ";
                     // line 209
//.........这里部分代码省略.........
开发者ID:BarloworldTransport,项目名称:BWTSupportWebTools,代码行数:101,代码来源:62c954794f26fd4a9fe5d0a10ae86f5925ca5250a1ca87b251c693f1c0e8b7f0.php

示例14: getform_tree_entry

 public function getform_tree_entry($__name__ = null, $__data__ = null, $__expanded__ = null)
 {
     $context = $this->env->mergeGlobals(array("name" => $__name__, "data" => $__data__, "expanded" => $__expanded__, "varargs" => func_num_args() > 3 ? array_slice(func_get_args(), 3) : array()));
     $blocks = array();
     ob_start();
     try {
         $__internal_538c8443506485ae5524c332bb750bd6a186b921cedef8ea149ce9008baf9b7f = $this->env->getExtension("native_profiler");
         $__internal_538c8443506485ae5524c332bb750bd6a186b921cedef8ea149ce9008baf9b7f->enter($__internal_538c8443506485ae5524c332bb750bd6a186b921cedef8ea149ce9008baf9b7f_prof = new Twig_Profiler_Profile($this->getTemplateName(), "macro", "form_tree_entry"));
         // line 427
         echo "    ";
         $context["tree"] = $this;
         // line 428
         echo "    <li>\n        <div class=\"tree-inner\" data-tab-target-id=\"";
         // line 429
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["data"]) ? $context["data"] : $this->getContext($context, "data"), "id", array()), "html", null, true);
         echo "-details\">\n            ";
         // line 430
         if (!twig_test_empty($this->getAttribute(isset($context["data"]) ? $context["data"] : $this->getContext($context, "data"), "children", array()))) {
             // line 431
             echo "                <a class=\"toggle-button\" data-toggle-target-id=\"";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["data"]) ? $context["data"] : $this->getContext($context, "data"), "id", array()), "html", null, true);
             echo "-children\" href=\"#\"><span class=\"toggle-icon\"></span></a>\n            ";
         } else {
             // line 433
             echo "                <div class=\"toggle-icon empty\"></div>\n            ";
         }
         // line 435
         echo "\n            ";
         // line 436
         echo twig_escape_filter($this->env, array_key_exists("name", $context) ? _twig_default_filter(isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"), "(no name)") : "(no name)", "html", null, true);
         echo " ";
         if ($this->getAttribute(isset($context["data"]) ? $context["data"] : null, "type_class", array(), "any", true, true) && $this->getAttribute(isset($context["data"]) ? $context["data"] : null, "type", array(), "any", true, true)) {
             echo "[<abbr title=\"";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["data"]) ? $context["data"] : $this->getContext($context, "data"), "type_class", array()), "html", null, true);
             echo "\">";
             echo twig_escape_filter($this->env, twig_last($this->env, twig_split_filter($this->env, $this->getAttribute(isset($context["data"]) ? $context["data"] : $this->getContext($context, "data"), "type", array()), "\\")), "html", null, true);
             echo "</abbr>]";
         }
         // line 437
         echo "\n            ";
         // line 438
         if ($this->getAttribute(isset($context["data"]) ? $context["data"] : null, "errors", array(), "any", true, true) && twig_length_filter($this->env, $this->getAttribute(isset($context["data"]) ? $context["data"] : $this->getContext($context, "data"), "errors", array())) > 0) {
             // line 439
             echo "                <div class=\"badge-error\">";
             echo twig_escape_filter($this->env, twig_length_filter($this->env, $this->getAttribute(isset($context["data"]) ? $context["data"] : $this->getContext($context, "data"), "errors", array())), "html", null, true);
             echo "</div>\n            ";
         }
         // line 441
         echo "        </div>\n\n        ";
         // line 443
         if (!twig_test_empty($this->getAttribute(isset($context["data"]) ? $context["data"] : $this->getContext($context, "data"), "children", array()))) {
             // line 444
             echo "            <ul id=\"";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["data"]) ? $context["data"] : $this->getContext($context, "data"), "id", array()), "html", null, true);
             echo "-children\" ";
             if (!(isset($context["expanded"]) ? $context["expanded"] : $this->getContext($context, "expanded"))) {
                 echo "class=\"hidden\"";
             }
             echo ">\n                ";
             // line 445
             $context['_parent'] = $context;
             $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["data"]) ? $context["data"] : $this->getContext($context, "data"), "children", array()));
             foreach ($context['_seq'] as $context["childName"] => $context["childData"]) {
                 // line 446
                 echo "                    ";
                 echo $context["tree"]->getform_tree_entry($context["childName"], $context["childData"], false);
                 echo "\n                ";
             }
             $_parent = $context['_parent'];
             unset($context['_seq'], $context['_iterated'], $context['childName'], $context['childData'], $context['_parent'], $context['loop']);
             $context = array_intersect_key($context, $_parent) + $_parent;
             // line 448
             echo "            </ul>\n        ";
         }
         // line 450
         echo "    </li>\n";
         $__internal_538c8443506485ae5524c332bb750bd6a186b921cedef8ea149ce9008baf9b7f->leave($__internal_538c8443506485ae5524c332bb750bd6a186b921cedef8ea149ce9008baf9b7f_prof);
     } catch (Exception $e) {
         ob_end_clean();
         throw $e;
     }
     return '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
 }
开发者ID:abbeshamza,项目名称:TestCodeception,代码行数:83,代码来源:137b96c432fa659b2d449a8b9d33d74f74f8aba6fdfb3b458fcb9fe799cef94e.php

示例15: block_vich_file_widget

 public function block_vich_file_widget($context, array $blocks = array())
 {
     $__internal_4dc69c9c9d424baa7f027f4816c8ee2b7f20ac5dc828629353a0dd2bd8937c1c = $this->env->getExtension("native_profiler");
     $__internal_4dc69c9c9d424baa7f027f4816c8ee2b7f20ac5dc828629353a0dd2bd8937c1c->enter($__internal_4dc69c9c9d424baa7f027f4816c8ee2b7f20ac5dc828629353a0dd2bd8937c1c_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "vich_file_widget"));
     // line 344
     ob_start();
     // line 345
     echo "    <div class=\"easyadmin-vich-file\">\n        ";
     // line 346
     if (!twig_test_empty(array_key_exists("download_uri", $context) ? _twig_default_filter(isset($context["download_uri"]) ? $context["download_uri"] : $this->getContext($context, "download_uri"), "") : "")) {
         // line 347
         echo "            ";
         $context["download_title"] = twig_last($this->env, twig_split_filter($this->env, isset($context["download_uri"]) ? $context["download_uri"] : $this->getContext($context, "download_uri"), "/")) ? twig_last($this->env, twig_split_filter($this->env, isset($context["download_uri"]) ? $context["download_uri"] : $this->getContext($context, "download_uri"), "/")) : $this->env->getExtension('translator')->trans("download", array(), "VichUploaderBundle");
         // line 348
         echo "            <a href=\"";
         echo twig_escape_filter($this->env, isset($context["download_uri"]) ? $context["download_uri"] : $this->getContext($context, "download_uri"), "html", null, true);
         echo "\">";
         echo twig_escape_filter($this->env, isset($context["download_title"]) ? $context["download_title"] : $this->getContext($context, "download_title"), "html", null, true);
         echo "</a>\n        ";
     }
     // line 350
     echo "\n        <div class=\"row\">\n            ";
     // line 352
     if ($this->getAttribute(isset($context["form"]) ? $context["form"] : null, "delete", array(), "any", true, true)) {
         // line 353
         echo "            <div class=\"col-sm-3 col-md-2\">\n                ";
         // line 354
         echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute(isset($context["form"]) ? $context["form"] : $this->getContext($context, "form"), "delete", array()), 'row');
         echo "\n            </div>\n            ";
     }
     // line 357
     echo "            <div class=\"";
     echo $this->getAttribute(isset($context["form"]) ? $context["form"] : null, "delete", array(), "any", true, true) ? "col-sm-9 col-md-10" : "col-sm-12";
     echo "\">\n                ";
     // line 358
     echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute(isset($context["form"]) ? $context["form"] : $this->getContext($context, "form"), "file", array()), 'widget');
     echo "\n            </div>\n        </div>\n    </div>\n";
     echo trim(preg_replace('/>\\s+</', '><', ob_get_clean()));
     $__internal_4dc69c9c9d424baa7f027f4816c8ee2b7f20ac5dc828629353a0dd2bd8937c1c->leave($__internal_4dc69c9c9d424baa7f027f4816c8ee2b7f20ac5dc828629353a0dd2bd8937c1c_prof);
 }
开发者ID:karolskora1993,项目名称:strona-przedszkola,代码行数:40,代码来源:70eea615fabf882c5decddec589b4dac2eea9b7ae18d08064f1e57b6a59b523d.php


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