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


PHP twig_length_filter函数代码示例

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


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

示例1: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     $__internal_802e3c758f6323baa820d5db315295344fc813394a7d2bff4b65279a38ba4516 = $this->env->getExtension("native_profiler");
     $__internal_802e3c758f6323baa820d5db315295344fc813394a7d2bff4b65279a38ba4516->enter($__internal_802e3c758f6323baa820d5db315295344fc813394a7d2bff4b65279a38ba4516_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "SonataAdminBundle:CRUD:base_inline_edit_field.html.twig"));
     // line 11
     echo "\n<div id=\"sonata-ba-field-container-";
     // line 12
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["field_element"]) ? $context["field_element"] : $this->getContext($context, "field_element"), "vars", array()), "id", array()), "html", null, true);
     echo "\" class=\"sonata-ba-field sonata-ba-field-";
     echo twig_escape_filter($this->env, isset($context["edit"]) ? $context["edit"] : $this->getContext($context, "edit"), "html", null, true);
     echo "-";
     echo twig_escape_filter($this->env, isset($context["inline"]) ? $context["inline"] : $this->getContext($context, "inline"), "html", null, true);
     echo " ";
     if (twig_length_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["field_element"]) ? $context["field_element"] : $this->getContext($context, "field_element"), "vars", array()), "errors", array()))) {
         echo "sonata-ba-field-error";
     }
     echo "\">\n\n    ";
     // line 14
     $this->displayBlock('label', $context, $blocks);
     // line 24
     echo "\n    ";
     // line 25
     $this->displayBlock('field', $context, $blocks);
     // line 26
     echo "\n    <div class=\"sonata-ba-field-error-messages\">\n        ";
     // line 28
     $this->displayBlock('errors', $context, $blocks);
     // line 29
     echo "    </div>\n</div>\n";
     $__internal_802e3c758f6323baa820d5db315295344fc813394a7d2bff4b65279a38ba4516->leave($__internal_802e3c758f6323baa820d5db315295344fc813394a7d2bff4b65279a38ba4516_prof);
 }
开发者ID:shine2lay,项目名称:jack,代码行数:31,代码来源:6ea5f902a76fd81604bc24713fdea023bcaef7fdea737727f5332125d834be44.php

示例2: block_content

 public function block_content($context, array $blocks = array())
 {
     // line 6
     echo "    <div class=\"row\">\n        <div class=\"span12\">\n            <p><strong>Payment request:</strong> ";
     // line 8
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["paymentRequest"]) ? $context["paymentRequest"] : $this->getContext($context, "paymentRequest"), "title", array()), "html", null, true);
     echo " </p>\n            <p><strong>Petition:</strong> ";
     // line 9
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["petition"]) ? $context["petition"] : $this->getContext($context, "petition"), "petitionTitle", array()), "html", null, true);
     echo "</p>\n            <p><strong>Signed:</strong> ";
     // line 10
     echo twig_escape_filter($this->env, twig_length_filter($this->env, isset($context["users"]) ? $context["users"] : $this->getContext($context, "users")), "html", null, true);
     echo "</p>\n        </div>\n        <br>\n        <br>\n        <div class=\"span12\">\n            <form method=\"post\">\n                ";
     // line 16
     echo $this->env->getExtension('form')->renderer->searchAndRenderBlock(isset($context["form"]) ? $context["form"] : $this->getContext($context, "form"), 'widget');
     echo "\n                <input name=\"user_count\" value=\"";
     // line 17
     echo twig_escape_filter($this->env, twig_length_filter($this->env, isset($context["users"]) ? $context["users"] : $this->getContext($context, "users")), "html", null, true);
     echo "\" type=\"hidden\">\n                ";
     // line 18
     if (isset($context["hasCard"]) ? $context["hasCard"] : $this->getContext($context, "hasCard")) {
         // line 19
         echo "                    <input type=\"submit\" class=\"btn btn-primary\" value=\"Pay & Publish\">\n                ";
     } else {
         // line 21
         echo "                    <a class=\"btn btn-primary\" data-open-card-from>Add Card</a>\n                ";
     }
     // line 23
     echo "            </form>\n        </div>\n    </div>\n\n    ";
     // line 27
     echo twig_include($this->env, $context, "CivixFrontBundle:PaymentSettings:stripe.html.twig");
     echo "\n";
 }
开发者ID:austinpapp,项目名称:push-notifications-temp,代码行数:33,代码来源:7426549200cd98ca92b7239c2abc490213142eb34425b901c4f295ba4916.php

示例3: block_form_errors

 public function block_form_errors($context, array $blocks = array())
 {
     // line 4
     if (twig_length_filter($this->env, isset($context["errors"]) ? $context["errors"] : null) > 0) {
         // line 5
         if ($this->getAttribute(isset($context["form"]) ? $context["form"] : null, "parent", array())) {
             echo "<span class=\"help-block\">";
         } else {
             echo "<div class=\"alert alert-danger\">";
         }
         // line 6
         echo "    <ul class=\"list-unstyled\">";
         // line 7
         $context['_parent'] = $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["errors"]) ? $context["errors"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
             // line 8
             echo "<p class=\"errormsg text-danger\">";
             echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans($this->getAttribute($context["error"], "message", array())), "html", null, true);
             echo "</p>";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['error'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 10
         echo "</ul>\n    ";
         // line 11
         if ($this->getAttribute(isset($context["form"]) ? $context["form"] : null, "parent", array())) {
             echo "</span>";
         } else {
             echo "</div>";
         }
     }
 }
开发者ID:kiyosue,项目名称:eccube3_plugin_study,代码行数:34,代码来源:470ecda649a239d6ac783448f37a55f9e57cb8c0ce5712730002fe09c2600d18.php

示例4: block_field_errors

 public function block_field_errors($context, array $blocks = array())
 {
     // line 2
     echo "    ";
     ob_start();
     // line 3
     echo "        ";
     if (twig_length_filter($this->env, isset($context["errors"]) ? $context["errors"] : $this->getContext($context, "errors")) > 0) {
         // line 4
         echo "            <div class=\"span\">\n                ";
         // line 5
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["errors"]) ? $context["errors"] : $this->getContext($context, "errors"));
         foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
             // line 6
             echo "                    <span class=\"label label-danger\">";
             echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans($this->getAttribute(isset($context["error"]) ? $context["error"] : $this->getContext($context, "error"), "messageTemplate"), $this->getAttribute(isset($context["error"]) ? $context["error"] : $this->getContext($context, "error"), "messageParameters"), "validators"), "html", null, true);
             echo "</span>\n                ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['error'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 8
         echo "            </div>\n        ";
     }
     // line 10
     echo "    ";
     echo trim(preg_replace('/>\\s+</', '><', ob_get_clean()));
 }
开发者ID:FARIDMESCAM,项目名称:Manufacture,代码行数:29,代码来源:6cf4d049cc59724a9f7f360478317f77ad9ace77bda4751c4d584e0348b1.php

示例5: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "<section class=\"generic";
     if (twig_length_filter($this->env, $this->getAttribute($this->getContext($context, "section"), "modifiers"))) {
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, "section"), "modifiers"));
         foreach ($context['_seq'] as $context["_key"] => $context["modifier"]) {
             echo " ";
             echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "modifier"), "className"), "html", null, true);
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['modifier'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
     }
     echo "\">\n\t";
     // line 2
     if ($this->getAttribute($this->getContext($context, "section"), "header")) {
         // line 3
         echo "\t<header>\n\t\t";
         // line 4
         echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "section"), "header"), "html", null, true);
         echo "\t\n\t</header>\n\t";
     }
     // line 7
     echo "\t";
     if ($this->getAttribute($this->getContext($context, "section"), "body")) {
         // line 8
         echo "\t";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "section"), "body"), "html", null, true);
         echo "\n\t";
     }
     // line 10
     echo "</section>";
 }
开发者ID:scisahaha,项目名称:generator-craft,代码行数:35,代码来源:67062dc76f6702a5a8f69190a83e1f18e493bfe9725baa16d823246e8d82.php

示例6: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "<tr>\n    <td>Запрашиваетcя поддержка в точке</td>\n    <td style=\"color: #44562a\">";
     // line 3
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["request"]) ? $context["request"] : null, "attendance", array()), "full_path", array()), "html", null, true);
     echo "</td>\n</tr>\n\n<tr>\n    <td>Запрос создал</td>\n    <td>\n        ";
     // line 9
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["request"]) ? $context["request"] : null, "owner", array()), "login", array()), "html", null, true);
     echo "\n        <br>";
     // line 10
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["request"]) ? $context["request"] : null, "owner", array()), "fio", array()), "html", null, true);
     echo ", ";
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["request"]) ? $context["request"] : null, "owner", array()), "phone", array()), "html", null, true);
     echo ",\n    </td>\n</tr>\n<tr>\n    <td>Сообщение от пользователя</td>\n    <td>\n        ";
     // line 16
     if (twig_length_filter($this->env, $this->getAttribute(isset($context["request"]) ? $context["request"] : null, "user_message", array()))) {
         // line 17
         echo "            ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["request"]) ? $context["request"] : null, "user_message", array()), "html", null, true);
         echo "\n        ";
     } else {
         // line 19
         echo "            -\n        ";
     }
     // line 21
     echo "    </td>\n</tr>";
 }
开发者ID:inilotic,项目名称:vks_nodes_core,代码行数:28,代码来源:f686274ac0994eb4392d30a4ba3556bd195e43c8e1bd6b86c5daed5714a2fd95.php

示例7: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     $__internal_609386912737fdeb5c19cfac95533ac6c6640a08b133bbc9c2f1005150fa4bd7 = $this->env->getExtension("native_profiler");
     $__internal_609386912737fdeb5c19cfac95533ac6c6640a08b133bbc9c2f1005150fa4bd7->enter($__internal_609386912737fdeb5c19cfac95533ac6c6640a08b133bbc9c2f1005150fa4bd7_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "SonataAdminBundle:CRUD:base_inline_edit_field.html.twig"));
     // line 11
     echo "\n<div id=\"sonata-ba-field-container-";
     // line 12
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["field_element"]) ? $context["field_element"] : $this->getContext($context, "field_element"), "vars", array()), "id", array()), "html", null, true);
     echo "\" class=\"sonata-ba-field sonata-ba-field-";
     echo twig_escape_filter($this->env, isset($context["edit"]) ? $context["edit"] : $this->getContext($context, "edit"), "html", null, true);
     echo "-";
     echo twig_escape_filter($this->env, isset($context["inline"]) ? $context["inline"] : $this->getContext($context, "inline"), "html", null, true);
     echo " ";
     if (twig_length_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["field_element"]) ? $context["field_element"] : $this->getContext($context, "field_element"), "vars", array()), "errors", array()))) {
         echo "sonata-ba-field-error";
     }
     echo "\">\n\n    ";
     // line 14
     $this->displayBlock('label', $context, $blocks);
     // line 24
     echo "\n    ";
     // line 25
     $this->displayBlock('field', $context, $blocks);
     // line 26
     echo "\n    <div class=\"sonata-ba-field-error-messages\">\n        ";
     // line 28
     $this->displayBlock('errors', $context, $blocks);
     // line 29
     echo "    </div>\n</div>\n";
     $__internal_609386912737fdeb5c19cfac95533ac6c6640a08b133bbc9c2f1005150fa4bd7->leave($__internal_609386912737fdeb5c19cfac95533ac6c6640a08b133bbc9c2f1005150fa4bd7_prof);
 }
开发者ID:stuckiest,项目名称:SymfonyBlog,代码行数:31,代码来源:6a35929e6344362748d8d8346ca73611d56810dbb51d33c79f382a7785fec675.php

示例8: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     $__internal_173ad3a50b98e16ee263d504c2c0bfcb6fd12a5e908c76729d1c86f3cc1ec549 = $this->env->getExtension("native_profiler");
     $__internal_173ad3a50b98e16ee263d504c2c0bfcb6fd12a5e908c76729d1c86f3cc1ec549->enter($__internal_173ad3a50b98e16ee263d504c2c0bfcb6fd12a5e908c76729d1c86f3cc1ec549_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "@WebProfiler/Profiler/base_js.html.twig"));
     // line 1
     echo "<script>/*<![CDATA[*/\n    Sfjs = (function() {\n        \"use strict\";\n\n        var noop = function() {},\n\n            collectionToArray = function (collection) {\n                var length = collection.length || 0,\n                    results = new Array(length);\n\n                while (length--) {\n                    results[length] = collection[length];\n                }\n\n                return results;\n            },\n\n            profilerStorageKey = 'sf2/profiler/',\n\n            request = function(url, onSuccess, onError, payload, options) {\n                var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');\n                options = options || {};\n                options.maxTries = options.maxTries || 0;\n                xhr.open(options.method || 'GET', url, true);\n                xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n                xhr.onreadystatechange = function(state) {\n                    if (4 !== xhr.readyState) {\n                        return null;\n                    }\n\n                    if (xhr.status == 404 && options.maxTries > 1) {\n                        setTimeout(function(){\n                            options.maxTries--;\n                            request(url, onSuccess, onError, payload, options);\n                        }, 500);\n\n                        return null;\n                    }\n\n                    if (200 === xhr.status) {\n                        (onSuccess || noop)(xhr);\n                    } else {\n                        (onError || noop)(xhr);\n                    }\n                };\n                xhr.send(payload || '');\n            },\n\n            hasClass = function(el, klass) {\n                return el.className && el.className.match(new RegExp('\\\\b' + klass + '\\\\b'));\n            },\n\n            removeClass = function(el, klass) {\n                if (el.className) {\n                    el.className = el.className.replace(new RegExp('\\\\b' + klass + '\\\\b'), ' ');\n                }\n            },\n\n            addClass = function(el, klass) {\n                if (!hasClass(el, klass)) {\n                    el.className += \" \" + klass;\n                }\n            },\n\n            getPreference = function(name) {\n                if (!window.localStorage) {\n                    return null;\n                }\n\n                return localStorage.getItem(profilerStorageKey + name);\n            },\n\n            setPreference = function(name, value) {\n                if (!window.localStorage) {\n                    return null;\n                }\n\n                localStorage.setItem(profilerStorageKey + name, value);\n            },\n\n            requestStack = [],\n\n            renderAjaxRequests = function() {\n                var requestCounter = document.querySelectorAll('.sf-toolbar-ajax-requests');\n                if (!requestCounter.length) {\n                    return;\n                }\n\n                var tbodies = document.querySelectorAll('.sf-toolbar-ajax-request-list');\n                var state = 'ok';\n                if (tbodies.length) {\n                    var tbody = tbodies[0];\n\n                    var rows = document.createDocumentFragment();\n\n                    if (requestStack.length) {\n                        for (var i = 0; i < requestStack.length; i++) {\n                            var request = requestStack[i];\n\n                            var row = document.createElement('tr');\n                            rows.appendChild(row);\n\n                            var methodCell = document.createElement('td');\n                            if (request.error) {\n                                methodCell.className = 'sf-ajax-request-error';\n                            }\n                            methodCell.textContent = request.method;\n                            row.appendChild(methodCell);\n\n                            var pathCell = document.createElement('td');\n                            pathCell.className = 'sf-ajax-request-url';\n                            if ('GET' === request.method) {\n                                var pathLink = document.createElement('a');\n                                pathLink.setAttribute('href', request.url);\n                                pathLink.textContent = request.url;\n                                pathCell.appendChild(pathLink);\n                            } else {\n                                pathCell.textContent = request.url;\n                            }\n                            pathCell.setAttribute('title', request.url);\n                            row.appendChild(pathCell);\n\n                            var durationCell = document.createElement('td');\n                            durationCell.className = 'sf-ajax-request-duration';\n\n                            if (request.duration) {\n                                durationCell.textContent = request.duration + \"ms\";\n                            } else {\n                                durationCell.textContent = '-';\n                            }\n                            row.appendChild(durationCell);\n\n                            row.appendChild(document.createTextNode(' '));\n                            var profilerCell = document.createElement('td');\n\n                            if (request.profilerUrl) {\n                                var profilerLink = document.createElement('a');\n                                profilerLink.setAttribute('href', request.profilerUrl);\n                                profilerLink.textContent = request.profile;\n                                profilerCell.appendChild(profilerLink);\n                            } else {\n                                profilerCell.textContent = 'n/a';\n                            }\n\n                            row.appendChild(profilerCell);\n\n                            var requestState = 'ok';\n                            if (request.error) {\n                                requestState = 'error';\n                                if (state != \"loading\" && i > requestStack.length - 4) {\n                                    state = 'error';\n                                }\n                            } else if (request.loading) {\n                                requestState = 'loading';\n                                state = 'loading';\n                            }\n                            row.className = 'sf-ajax-request sf-ajax-request-' + requestState;\n                        }\n\n                        var infoSpan = document.querySelectorAll(\".sf-toolbar-ajax-info\")[0];\n                        var children = collectionToArray(tbody.children);\n                        for (var i = 0; i < children.length; i++) {\n                            tbody.removeChild(children[i]);\n                        }\n                        tbody.appendChild(rows);\n\n                        if (infoSpan) {\n                            var text = requestStack.length + ' call' + (requestStack.length > 1 ? 's' : '');\n                            infoSpan.textContent = text;\n                        }\n                    } else {\n                        var cell = document.createElement('td');\n                        cell.setAttribute('colspan', '4');\n                        cell.textContent = \"No AJAX requests yet.\";\n                        var row = document.createElement('tr');\n                        row.appendChild(cell);\n                        tbody.appendChild(row);\n                    }\n                }\n\n                requestCounter[0].textContent = requestStack.length;\n\n                var className = 'sf-toolbar-ajax-requests sf-toolbar-status';\n                if (state == 'ok') {\n                    className += ' sf-toolbar-status-green';\n                } else if (state == 'error') {\n                    className += ' sf-toolbar-status-red';\n                } else {\n                    className += ' sf-ajax-request-loading';\n                }\n\n                requestCounter[0].className = className;\n            };\n\n        var addEventListener;\n\n        var el = document.createElement('div');\n        if (!'addEventListener' in el) {\n            addEventListener = function (element, eventName, callback) {\n                element.attachEvent('on' + eventName, callback);\n            };\n        } else {\n            addEventListener = function (element, eventName, callback) {\n                element.addEventListener(eventName, callback, false);\n            };\n        }\n\n        ";
     // line 208
     if (array_key_exists("excluded_ajax_paths", $context)) {
         // line 209
         echo "            if (window.XMLHttpRequest && XMLHttpRequest.prototype.addEventListener) {\n                var proxied = XMLHttpRequest.prototype.open;\n\n                XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {\n                    var self = this;\n\n                    /* prevent logging AJAX calls to static and inline files, like templates */\n                    var path = url;\n                    if (url.substr(0, 1) === '/') {\n                        if (0 === url.indexOf('";
         // line 218
         echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute(isset($context["request"]) ? $context["request"] : $this->getContext($context, "request"), "basePath", array()), "js"), "html", null, true);
         echo "')) {\n                            path = url.substr(";
         // line 219
         echo twig_escape_filter($this->env, twig_length_filter($this->env, $this->getAttribute(isset($context["request"]) ? $context["request"] : $this->getContext($context, "request"), "basePath", array())), "html", null, true);
         echo ");\n                        }\n                    }\n                    else if (0 === url.indexOf('";
         // line 222
         echo twig_escape_filter($this->env, twig_escape_filter($this->env, $this->getAttribute(isset($context["request"]) ? $context["request"] : $this->getContext($context, "request"), "schemeAndHttpHost", array()) . $this->getAttribute(isset($context["request"]) ? $context["request"] : $this->getContext($context, "request"), "basePath", array()), "js"), "html", null, true);
         echo "')) {\n                        path = url.substr(";
         // line 223
         echo twig_escape_filter($this->env, twig_length_filter($this->env, $this->getAttribute(isset($context["request"]) ? $context["request"] : $this->getContext($context, "request"), "schemeAndHttpHost", array()) . $this->getAttribute(isset($context["request"]) ? $context["request"] : $this->getContext($context, "request"), "basePath", array())), "html", null, true);
         echo ");\n                    }\n\n                    if (path.substr(0, 1) === '/' && !path.match(new RegExp(";
         // line 226
         echo twig_jsonencode_filter(isset($context["excluded_ajax_paths"]) ? $context["excluded_ajax_paths"] : $this->getContext($context, "excluded_ajax_paths"));
         echo "))) {\n                        var stackElement = {\n                            loading: true,\n                            error: false,\n                            url: url,\n                            method: method,\n                            start: new Date()\n                        };\n\n                        requestStack.push(stackElement);\n\n                        this.addEventListener('readystatechange', function() {\n                            if (self.readyState == 4) {\n                                stackElement.duration = new Date() - stackElement.start;\n                                stackElement.loading = false;\n                                stackElement.error = self.status < 200 || self.status >= 400;\n                                stackElement.profile = self.getResponseHeader(\"X-Debug-Token\");\n                                stackElement.profilerUrl = self.getResponseHeader(\"X-Debug-Token-Link\");\n\n                                Sfjs.renderAjaxRequests();\n                            }\n                        }, false);\n\n                        Sfjs.renderAjaxRequests();\n                    }\n\n                    proxied.apply(this, Array.prototype.slice.call(arguments));\n                };\n            }\n        ";
     }
     // line 256
     echo "\n        return {\n            hasClass: hasClass,\n\n            removeClass: removeClass,\n\n            addClass: addClass,\n\n            getPreference: getPreference,\n\n            setPreference: setPreference,\n\n            addEventListener: addEventListener,\n\n            request: request,\n\n            renderAjaxRequests: renderAjaxRequests,\n\n            load: function(selector, url, onSuccess, onError, options) {\n                var el = document.getElementById(selector);\n\n                if (el && el.getAttribute('data-sfurl') !== url) {\n                    request(\n                        url,\n                        function(xhr) {\n                            el.innerHTML = xhr.responseText;\n                            el.setAttribute('data-sfurl', url);\n                            removeClass(el, 'loading');\n                            (onSuccess || noop)(xhr, el);\n                        },\n                        function(xhr) { (onError || noop)(xhr, el); },\n                        '',\n                        options\n                    );\n                }\n\n                return this;\n            },\n\n            toggle: function(selector, elOn, elOff) {\n                var tmp = elOn.style.display,\n                    el = document.getElementById(selector);\n\n                elOn.style.display = elOff.style.display;\n                elOff.style.display = tmp;\n\n                if (el) {\n                    el.style.display = 'none' === tmp ? 'none' : 'block';\n                }\n\n                return this;\n            }\n        }\n    })();\n/*]]>*/</script>\n";
     $__internal_173ad3a50b98e16ee263d504c2c0bfcb6fd12a5e908c76729d1c86f3cc1ec549->leave($__internal_173ad3a50b98e16ee263d504c2c0bfcb6fd12a5e908c76729d1c86f3cc1ec549_prof);
 }
开发者ID:bamper,项目名称:clothing_store_symfony,代码行数:30,代码来源:fdfb0551ecc8fadd42a9c87a3d59763cc04f01a364106c1d6abb9ef51f56a0b5.php

示例9: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     if (isset($context["exception"])) {
         $_exception_ = $context["exception"];
     } else {
         $_exception_ = null;
     }
     if (twig_length_filter($this->env, $this->getAttribute($_exception_, "trace", array()))) {
         // line 2
         if (isset($context["exception"])) {
             $_exception_ = $context["exception"];
         } else {
             $_exception_ = null;
         }
         $context['_parent'] = $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute($_exception_, "trace", array()));
         foreach ($context['_seq'] as $context["_key"] => $context["trace"]) {
             // line 3
             if (isset($context["trace"])) {
                 $_trace_ = $context["trace"];
             } else {
                 $_trace_ = null;
             }
             $this->loadTemplate("TwigBundle:Exception:trace.txt.twig", "TwigBundle:Exception:traces.txt.twig", 3)->display(array("trace" => $_trace_));
             // line 4
             echo "\n";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['trace'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
     }
 }
开发者ID:mkemiche,项目名称:Annuaire,代码行数:33,代码来源:53e852aeeb0013576a45508f07b426fa55b0aea6ff81884bf8613e3745bd1903.php

示例10: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     if (twig_length_filter($this->env, $this->getAttribute(isset($context["loops"]) ? $context["loops"] : null, "quickmod", array()))) {
         // line 2
         echo "<div id=\"quickmod\" class=\"dropdown\">\n  <button class=\"btn btn-default btn-block dropdown-toggle\" type=\"button\" id=\"quickmod-tools\" data-toggle=\"dropdown\" aria-expanded=\"true\">\n   ";
         // line 4
         echo $this->env->getExtension('phpbb')->lang("QUICK_MOD");
         echo "\n    <span class=\"caret\"></span>\n  </button>\n  <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"quickmod-tools\" style=\"width: 100%;\">\n  <!-- <li role=\"presentation\" class=\"dropdown-header\">Dropdown header</li> -->\n    ";
         // line 9
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["loops"]) ? $context["loops"] : null, "quickmod", array()));
         foreach ($context['_seq'] as $context["_key"] => $context["quickmod"]) {
             // line 10
             echo "\t ";
             $value = twig_in_filter($this->getAttribute($context["quickmod"], "VALUE", array()), array(0 => "lock", 1 => "unlock", 2 => "delete_topic", 3 => "restore_topic", 4 => "make_normal", 5 => "make_sticky", 6 => "make_announce", 7 => "make_global"));
             $context['definition']->set('QUICKMOD_AJAX', $value);
             // line 11
             echo "\t <li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"";
             echo $this->getAttribute($context["quickmod"], "LINK", array());
             echo "\"";
             if ($this->getAttribute(isset($context["definition"]) ? $context["definition"] : null, "QUICKMOD_AJAX", array())) {
                 echo " data-ajax=\"true\" data-refresh=\"true\"";
             }
             echo ">";
             echo $this->getAttribute($context["quickmod"], "TITLE", array());
             echo "</a></li>\n\t";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['quickmod'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 13
         echo "  </ul>\n</div>\t\t\n";
     }
 }
开发者ID:rinodung,项目名称:phpbb-forum,代码行数:35,代码来源:d92d514272c1596a7b647d34f008c217603805a16c340324f41eb52ff026996c.php

示例11: block_body

 public function block_body($context, array $blocks = array())
 {
     $__internal_cc60a2d3ad91da3774514c1bbcc438202ae776283c0d56c7e7c094b65fc32627 = $this->env->getExtension("native_profiler");
     $__internal_cc60a2d3ad91da3774514c1bbcc438202ae776283c0d56c7e7c094b65fc32627->enter($__internal_cc60a2d3ad91da3774514c1bbcc438202ae776283c0d56c7e7c094b65fc32627_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "body"));
     // line 9
     if (twig_length_filter($this->env, isset($context["entities"]) ? $context["entities"] : $this->getContext($context, "entities")) > 0) {
         // line 10
         echo "\n        ";
         // line 11
         $context["lotissements"] = isset($context["entities"]) ? $context["entities"] : $this->getContext($context, "entities");
         // line 12
         echo "        ";
         $this->loadTemplate("@LaisoArm/Lotissement/includes/list_lotissement.html.twig", "LaisoArmBundle:Lotissement:index.html.twig", 12)->display($context);
         // line 13
         echo "\n        ";
         // line 14
         $this->loadTemplate("LaisoArmBundle:Shared:paginator.html.twig", "LaisoArmBundle:Lotissement:index.html.twig", 14)->display($context);
         // line 15
         echo "\n        <a class=\"ajax-button button primary\" href=\"";
         // line 16
         echo $this->env->getExtension('routing')->getPath("dao_new");
         echo "\">\n            Créer un nouvel appel d'offre\n        </a>\n    ";
     } else {
         // line 20
         echo "        <div class=\"laiso-bordered margin10 no-margin-left no-margin-right no-margin-bottom padding10 align-center bg-grayLighter\">\n            <h3>Aucun appel d'offre.</h3>\n\n            <a class=\"ajax-button button primary\" href=\"";
         // line 23
         echo $this->env->getExtension('routing')->getPath("dao_new");
         echo "\">\n                Créer un nouvel appel d'offre\n            </a>\n        </div>\n    ";
     }
     $__internal_cc60a2d3ad91da3774514c1bbcc438202ae776283c0d56c7e7c094b65fc32627->leave($__internal_cc60a2d3ad91da3774514c1bbcc438202ae776283c0d56c7e7c094b65fc32627_prof);
 }
开发者ID:gasikely2,项目名称:sgpec,代码行数:31,代码来源:8c6d2f8ed4a8a707c87279030e77b202c55f4722f0a7fde5f10f4ecabe51524b.php

示例12: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "Periodo:\n";
     // line 2
     if (twig_length_filter($this->env, isset($context["Listado_Years"]) ? $context["Listado_Years"] : $this->getContext($context, "Listado_Years")) > 0) {
         // line 3
         echo "        <select id=\"Years\"  style=\"width: 100%\" class=\"form-control\">\n\n            ";
         // line 5
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["Listado_Years"]) ? $context["Listado_Years"] : $this->getContext($context, "Listado_Years"));
         foreach ($context['_seq'] as $context["_key"] => $context["t"]) {
             // line 6
             echo "                <option value=\"";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["t"]) ? $context["t"] : $this->getContext($context, "t"), "periodoTrabajo"), "html", null, true);
             echo "\">\n                    ";
             // line 7
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["t"]) ? $context["t"] : $this->getContext($context, "t"), "periodoTrabajo"), "html", null, true);
             echo "\n                </option>\n            ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['t'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 10
         echo "        </select>\n";
     } else {
         // line 12
         echo "\n    <select id=\"Years\"  style=\"width: 100%\" class=\"form-control\">\n        <option value=\"0\">No hay datos a mostrar</option>\n    </select>\n\n";
     }
 }
开发者ID:jorgemunoz8807,项目名称:sisconee,代码行数:30,代码来源:b2cd75e67fc767f6daaa0cea44a1c995f8803fd91699151bb54f89b893d1.php

示例13: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "<ul class=\"archives\">\n\n";
     // line 3
     $context['_parent'] = $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["archives_data"]) ? $context["archives_data"] : null);
     foreach ($context['_seq'] as $context["month"] => $context["items"]) {
         // line 4
         echo "    <li>\n    \t<a href=\"";
         // line 5
         echo isset($context["base_url"]) ? $context["base_url"] : null;
         echo "/archives_month";
         echo $this->getAttribute($this->getAttribute(isset($context["config"]) ? $context["config"] : null, "system", array()), "param_sep", array());
         echo twig_escape_filter($this->env, twig_lower_filter($this->env, twig_date_format_filter($this->env, $context["month"], "M_Y")), "url");
         echo "\">\n        <span class=\"archive_date\">";
         // line 6
         echo $context["month"];
         echo "</span>\n        </a>";
         // line 7
         if (isset($context["archives_show_count"]) ? $context["archives_show_count"] : null) {
             echo "<span class=\"label\"> ( ";
             echo twig_length_filter($this->env, $context["items"]);
             echo " )</span>\n        ";
         }
         // line 9
         echo "    </li>\n";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['month'], $context['items'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 11
     echo "</ul>\n";
 }
开发者ID:pendigo,项目名称:pendigo.xyz,代码行数:34,代码来源:6e14d961534991b9690b4ecba8275452e4c42f6a60f2173c62560bbf210b7547.php

示例14: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 11
     echo "\n<div id=\"sonata-ba-field-container-";
     // line 12
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["field_element"]) ? $context["field_element"] : $this->getContext($context, "field_element"), "vars", array()), "id", array()), "html", null, true);
     echo "\" class=\"sonata-ba-field sonata-ba-field-";
     echo twig_escape_filter($this->env, isset($context["edit"]) ? $context["edit"] : $this->getContext($context, "edit"), "html", null, true);
     echo "-";
     echo twig_escape_filter($this->env, isset($context["inline"]) ? $context["inline"] : $this->getContext($context, "inline"), "html", null, true);
     echo " ";
     if (twig_length_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["field_element"]) ? $context["field_element"] : $this->getContext($context, "field_element"), "vars", array()), "errors", array()))) {
         echo "sonata-ba-field-error";
     }
     echo "\">\n\n    ";
     // line 14
     $this->displayBlock('label', $context, $blocks);
     // line 24
     echo "\n    ";
     // line 25
     $this->displayBlock('field', $context, $blocks);
     // line 26
     echo "\n    <div class=\"sonata-ba-field-error-messages\">\n        ";
     // line 28
     $this->displayBlock('errors', $context, $blocks);
     // line 29
     echo "    </div>\n</div>\n";
 }
开发者ID:axelleP,项目名称:Oetherium,代码行数:28,代码来源:a0b60a4f5fcf983d1cbbc26cb64166b94af39aa1acd86131b3486210b1ebb10f.php

示例15: block_content_header

 public function block_content_header($context, array $blocks = array())
 {
     // line 10
     echo "    <div class=\"type\">Index</div>\n\n    ";
     // line 12
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(range("A", "Z"));
     foreach ($context['_seq'] as $context["_key"] => $context["letter"]) {
         // line 13
         echo "        ";
         if ($this->getAttribute(isset($context["items"]) ? $context["items"] : null, isset($context["letter"]) ? $context["letter"] : $this->getContext($context, "letter"), array(), "array", true, true) && twig_length_filter($this->env, $this->getAttribute(isset($context["items"]) ? $context["items"] : $this->getContext($context, "items"), isset($context["letter"]) ? $context["letter"] : $this->getContext($context, "letter"), array(), "array")) > 1) {
             // line 14
             echo "            <a href=\"#letter";
             echo twig_escape_filter($this->env, isset($context["letter"]) ? $context["letter"] : $this->getContext($context, "letter"), "html", null, true);
             echo "\">";
             echo twig_escape_filter($this->env, isset($context["letter"]) ? $context["letter"] : $this->getContext($context, "letter"), "html", null, true);
             echo "</a>\n        ";
         } else {
             // line 16
             echo "            ";
             echo twig_escape_filter($this->env, isset($context["letter"]) ? $context["letter"] : $this->getContext($context, "letter"), "html", null, true);
             echo "\n        ";
         }
         // line 18
         echo "    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['letter'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
 }
开发者ID:bopo,项目名称:website,代码行数:30,代码来源:3173696cb32c181842b18f99e8ac8cbb0fa888a15c073e5758f91c7608c8.php


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