本文整理汇总了PHP中twig_template_get_attributes函数的典型用法代码示例。如果您正苦于以下问题:PHP twig_template_get_attributes函数的具体用法?PHP twig_template_get_attributes怎么用?PHP twig_template_get_attributes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了twig_template_get_attributes函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: block_toolbar
public function block_toolbar($context, array $blocks = array())
{
$__internal_9adef72a65a3682859e4bc72838a13faeaf5430cd635e3d606afd366160a6e64 = $this->env->getExtension("native_profiler");
$__internal_9adef72a65a3682859e4bc72838a13faeaf5430cd635e3d606afd366160a6e64->enter($__internal_9adef72a65a3682859e4bc72838a13faeaf5430cd635e3d606afd366160a6e64_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "toolbar"));
// line 4
echo " ";
ob_start();
// line 5
echo " <span>\n <svg width=\"13\" height=\"28\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" x=\"0px\" y=\"0px\" viewBox=\"0 0 13 28\" enable-background=\"new 0 0 13 28\" xml:space=\"preserve\"><g><rect x=\"3\" y=\"11\" fill=\"#BCBCBB\" width=\"7\" height=\"9\"/></g><g><path fill=\"#3F3F3F\" d=\"M11 6V21H2V6H0V22c0 0.6 0.4 1 1 1h11c0.6 0 1-0.4 1-1V6H11z\"/></g></svg>\n <span>";
// line 7
echo twig_escape_filter($this->env, sprintf("%.1f", twig_template_get_attributes($this, isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "memory", array()) / 1024 / 1024), "html", null, true);
echo " MB</span>\n </span>\n ";
$context["icon"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
// line 10
echo " ";
ob_start();
// line 11
echo " <div class=\"sf-toolbar-info-piece\">\n <b>Memory usage</b>\n <span>";
// line 13
echo twig_escape_filter($this->env, sprintf("%.1f", twig_template_get_attributes($this, isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "memory", array()) / 1024 / 1024), "html", null, true);
echo " / ";
echo twig_template_get_attributes($this, isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "memoryLimit", array()) == -1 ? "∞" : twig_escape_filter($this->env, sprintf("%.1f", twig_template_get_attributes($this, isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "memoryLimit", array()) / 1024 / 1024));
echo " MB</span>\n </div>\n ";
$context["text"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
// line 16
echo " ";
$this->loadTemplate("@WebProfiler/Profiler/toolbar_item.html.twig", "@WebProfiler/Collector/memory.html.twig", 16)->display(array_merge($context, array("link" => false)));
$__internal_9adef72a65a3682859e4bc72838a13faeaf5430cd635e3d606afd366160a6e64->leave($__internal_9adef72a65a3682859e4bc72838a13faeaf5430cd635e3d606afd366160a6e64_prof);
}
开发者ID:RuntyCybin,项目名称:csymfony,代码行数:29,代码来源:f7ece9035c583fa10d944eb58102e2430d174c1f53244e46b2e46f17ed5f.php
示例2: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$__internal_a0b93d3d955dec62c41cfd4dabe28b36b1a0f0c8ee46f247f4c1b40a626aeb27 = $this->env->getExtension("native_profiler");
$__internal_a0b93d3d955dec62c41cfd4dabe28b36b1a0f0c8ee46f247f4c1b40a626aeb27->enter($__internal_a0b93d3d955dec62c41cfd4dabe28b36b1a0f0c8ee46f247f4c1b40a626aeb27_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "@Twig/Exception/trace.txt.twig"));
// line 1
if (twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "function", array())) {
// line 2
echo " at ";
echo twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "class", array()) . twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "type", array()) . twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "function", array());
echo "(";
echo $this->env->getExtension('code')->formatArgsAsText(twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "args", array()));
echo ")\n";
} else {
// line 4
echo " at n/a\n";
}
// line 6
if (twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : null, "file", array(), "any", true, true) && twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : null, "line", array(), "any", true, true)) {
// line 7
echo " in ";
echo twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "file", array());
echo " line ";
echo twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "line", array());
echo "\n";
}
$__internal_a0b93d3d955dec62c41cfd4dabe28b36b1a0f0c8ee46f247f4c1b40a626aeb27->leave($__internal_a0b93d3d955dec62c41cfd4dabe28b36b1a0f0c8ee46f247f4c1b40a626aeb27_prof);
}
开发者ID:RuntyCybin,项目名称:CProject,代码行数:27,代码来源:bc4fbf6030e97c6273714f0776ea3f800aa0e5b22312c2d3bcf1b7bbf513fcdb.php
示例3: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$tags = array("if" => 22, "for" => 33);
$filters = array();
$functions = array();
try {
$this->env->getExtension('sandbox')->checkSecurity(array('if', 'for'), array(), array());
} catch (Twig_Sandbox_SecurityError $e) {
$e->setTemplateFile($this->getTemplateName());
if ($e instanceof Twig_Sandbox_SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
// line 22
if (isset($context["multiple"]) ? $context["multiple"] : null) {
// line 23
echo " <div class=\"js-form-item form-item\">\n ";
// line 24
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, isset($context["table"]) ? $context["table"] : null, "html", null, true));
echo "\n ";
// line 25
if (twig_template_get_attributes($this, isset($context["description"]) ? $context["description"] : null, "content", array())) {
// line 26
echo " <div";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, twig_template_get_attributes($this, twig_template_get_attributes($this, isset($context["description"]) ? $context["description"] : null, "attributes", array()), "addClass", array(0 => "description"), "method"), "html", null, true));
echo " >";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, twig_template_get_attributes($this, isset($context["description"]) ? $context["description"] : null, "content", array()), "html", null, true));
echo "</div>\n ";
}
// line 28
echo " ";
if (isset($context["button"]) ? $context["button"] : null) {
// line 29
echo " <div class=\"clearfix\">";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, isset($context["button"]) ? $context["button"] : null, "html", null, true));
echo "</div>\n ";
}
// line 31
echo " </div>\n";
} else {
// line 33
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(isset($context["elements"]) ? $context["elements"] : null);
foreach ($context['_seq'] as $context["_key"] => $context["element"]) {
// line 34
echo " ";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, $context["element"], "html", null, true));
echo "\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['element'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
}
开发者ID:mikekeilty,项目名称:seventen-marketing-website,代码行数:60,代码来源:5c7f654ba7ce67d3f9c62da123a43ac9f66f217fbcdaa36b063273589b63933b.php
示例4: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$__internal_be655af744011807162b8e2fc96b8dc6d010ebba262f563f899f196b51decc41 = $this->env->getExtension("native_profiler");
$__internal_be655af744011807162b8e2fc96b8dc6d010ebba262f563f899f196b51decc41->enter($__internal_be655af744011807162b8e2fc96b8dc6d010ebba262f563f899f196b51decc41_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "TwigBundle:Exception:traces_text.html.twig"));
// line 1
echo "<div class=\"block\">\n <h2>\n Stack Trace (Plain Text) \n ";
// line 4
ob_start();
// line 5
echo " <a href=\"#\" onclick=\"toggle('traces-text'); switchIcons('icon-traces-text-open', 'icon-traces-text-close'); return false;\">\n <img class=\"toggle\" id=\"icon-traces-text-close\" alt=\"-\" src=\"data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=\" style=\"display: none\" />\n <img class=\"toggle\" id=\"icon-traces-text-open\" alt=\"+\" src=\"data:image/gif;base64,R0lGODlhEgASAMQTANft99/v+Ga44bHb8ITG52S44dXs9+z1+uPx+YvK6WC24G+944/M6W28443L6dnu+Ge54v/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABMALAAAAAASABIAQAVS4DQBTiOd6LkwgJgeUSzHSDoNaZ4PU6FLgYBA5/vFID/DbylRGiNIZu74I0h1hNsVxbNuUV4d9SsZM2EzWe1qThVzwWFOAFCQFa1RQq6DJB4iIQA7\" style=\"display: inline\" />\n </a>\n ";
echo trim(preg_replace('/>\\s+</', '><', ob_get_clean()));
// line 10
echo " </h2>\n\n <div id=\"traces-text\" class=\"trace\" style=\"display: none;\">\n<pre>";
// line 13
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable(twig_template_get_attributes($this, isset($context["exception"]) ? $context["exception"] : $this->getContext($context, "exception"), "toarray", array()));
foreach ($context['_seq'] as $context["i"] => $context["e"]) {
// line 14
echo "[";
echo twig_escape_filter($this->env, $context["i"] + 1, "html", null, true);
echo "] ";
echo twig_escape_filter($this->env, twig_template_get_attributes($this, $context["e"], "class", array()), "html", null, true);
echo ": ";
echo twig_escape_filter($this->env, twig_template_get_attributes($this, $context["e"], "message", array()), "html", null, true);
echo "\n";
// line 15
$this->loadTemplate("TwigBundle:Exception:traces.txt.twig", "TwigBundle:Exception:traces_text.html.twig", 15)->display(array("exception" => $context["e"]));
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['i'], $context['e'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo "</pre>\n </div>\n</div>\n";
$__internal_be655af744011807162b8e2fc96b8dc6d010ebba262f563f899f196b51decc41->leave($__internal_be655af744011807162b8e2fc96b8dc6d010ebba262f563f899f196b51decc41_prof);
}
开发者ID:RuntyCybin,项目名称:csymfony,代码行数:35,代码来源:abf434acc326d49b1efca10416e15b6bba5f07ffde6a9b59836bbf100fbc.php
示例5: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$__internal_95165891656848f19f1e47c126e1ce92274717466d04410c4af1a4eb86c990da = $this->env->getExtension("native_profiler");
$__internal_95165891656848f19f1e47c126e1ce92274717466d04410c4af1a4eb86c990da->enter($__internal_95165891656848f19f1e47c126e1ce92274717466d04410c4af1a4eb86c990da_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, twig_template_get_attributes($this, 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, twig_template_get_attributes($this, 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, twig_template_get_attributes($this, isset($context["request"]) ? $context["request"] : $this->getContext($context, "request"), "schemeAndHttpHost", array()) . twig_template_get_attributes($this, 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, twig_template_get_attributes($this, isset($context["request"]) ? $context["request"] : $this->getContext($context, "request"), "schemeAndHttpHost", array()) . twig_template_get_attributes($this, 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_95165891656848f19f1e47c126e1ce92274717466d04410c4af1a4eb86c990da->leave($__internal_95165891656848f19f1e47c126e1ce92274717466d04410c4af1a4eb86c990da_prof);
}
开发者ID:RuntyCybin,项目名称:csymfony,代码行数:30,代码来源:6de05642dc9f833109162fb0b242270c510fd8d0c5b129de26b7f09c5aae.php
示例6: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$tags = array("set" => 14);
$filters = array("clean_class" => 15);
$functions = array();
try {
$this->env->getExtension('sandbox')->checkSecurity(array('set'), array('clean_class'), array());
} catch (Twig_Sandbox_SecurityError $e) {
$e->setTemplateFile($this->getTemplateName());
if ($e instanceof Twig_Sandbox_SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
// line 14
$context["classes"] = array(0 => isset($context["style_name"]) ? $context["style_name"] : null ? "image-style-" . \Drupal\Component\Utility\Html::getClass(isset($context["style_name"]) ? $context["style_name"] : null) : "");
// line 18
echo "<img";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, twig_template_get_attributes($this, isset($context["attributes"]) ? $context["attributes"] : null, "addClass", array(0 => isset($context["classes"]) ? $context["classes"] : null), "method"), "html", null, true));
echo " />\n";
}
开发者ID:mikekeilty,项目名称:seventen-marketing-website,代码行数:25,代码来源:ecf9391944b1de3a13a436e21aa579feaf6b39d16cfd8cd2d59c82af8f75a76f.php
示例7: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$tags = array("set" => 21);
$filters = array();
$functions = array();
try {
$this->env->getExtension('sandbox')->checkSecurity(array('set'), array(), array());
} catch (Twig_Sandbox_SecurityError $e) {
$e->setTemplateFile($this->getTemplateName());
if ($e instanceof Twig_Sandbox_SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
// line 21
$context["classes"] = array(0 => "filter-guidelines-item", 1 => "filter-guidelines-" . twig_template_get_attributes($this, isset($context["format"]) ? $context["format"] : null, "id", array()));
// line 26
echo "<div";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, twig_template_get_attributes($this, isset($context["attributes"]) ? $context["attributes"] : null, "addClass", array(0 => isset($context["classes"]) ? $context["classes"] : null), "method"), "html", null, true));
echo ">\n <h4 class=\"label\">";
// line 27
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, twig_template_get_attributes($this, isset($context["format"]) ? $context["format"] : null, "label", array()), "html", null, true));
echo "</h4>\n ";
// line 28
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, isset($context["tips"]) ? $context["tips"] : null, "html", null, true));
echo "\n</div>\n";
}
开发者ID:mikekeilty,项目名称:seventen-marketing-website,代码行数:31,代码来源:8377a63afefe441293fec03851de9fd128a741d1874dfe58eaea40a046e4375a.php
示例8: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$__internal_042adf0b7a35694acb18d0424d3a9f4a802235d815d344b19628202aea2ee9b8 = $this->env->getExtension("native_profiler");
$__internal_042adf0b7a35694acb18d0424d3a9f4a802235d815d344b19628202aea2ee9b8->enter($__internal_042adf0b7a35694acb18d0424d3a9f4a802235d815d344b19628202aea2ee9b8_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "TwigBundle:Exception:trace.txt.twig"));
// line 1
if (twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "function", array())) {
// line 2
echo " at ";
echo twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "class", array()) . twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "type", array()) . twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "function", array());
echo "(";
echo $this->env->getExtension('code')->formatArgsAsText(twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "args", array()));
echo ")\n";
} else {
// line 4
echo " at n/a\n";
}
// line 6
if (twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : null, "file", array(), "any", true, true) && twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : null, "line", array(), "any", true, true)) {
// line 7
echo " in ";
echo twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "file", array());
echo " line ";
echo twig_template_get_attributes($this, isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace"), "line", array());
echo "\n";
}
$__internal_042adf0b7a35694acb18d0424d3a9f4a802235d815d344b19628202aea2ee9b8->leave($__internal_042adf0b7a35694acb18d0424d3a9f4a802235d815d344b19628202aea2ee9b8_prof);
}
开发者ID:RuntyCybin,项目名称:csymfony,代码行数:27,代码来源:705067ed8952a6440313b8b4cddedeacf0945d35d8ea4c411280741ca78c.php
示例9: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$tags = array();
$filters = array();
$functions = array();
try {
$this->env->getExtension('sandbox')->checkSecurity(array(), array(), array());
} catch (Twig_Sandbox_SecurityError $e) {
$e->setTemplateFile($this->getTemplateName());
if ($e instanceof Twig_Sandbox_SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
// line 13
echo "<div";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, twig_template_get_attributes($this, isset($context["attributes"]) ? $context["attributes"] : null, "addClass", array(0 => "container-inline"), "method"), "html", null, true));
echo ">\n ";
// line 14
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, isset($context["content"]) ? $context["content"] : null, "html", null, true));
echo "\n</div>\n";
}
开发者ID:mikekeilty,项目名称:seventen-marketing-website,代码行数:26,代码来源:c3c4cc5d4fe6d5455d71a2ba8c345675769b2df8a1fafb57f172adbaf665132c.php
示例10: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$tags = array();
$filters = array("without" => 20);
$functions = array();
try {
$this->env->getExtension('sandbox')->checkSecurity(array(), array('without'), array());
} catch (Twig_Sandbox_SecurityError $e) {
$e->setTemplateFile($this->getTemplateName());
if ($e instanceof Twig_Sandbox_SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
// line 18
echo "<div class=\"layout-node-form clearfix\">\n <div class=\"layout-region layout-region-node-main\">\n ";
// line 20
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, twig_without(isset($context["form"]) ? $context["form"] : null, "advanced", "actions"), "html", null, true));
echo "\n </div>\n <div class=\"layout-region layout-region-node-secondary\">\n ";
// line 23
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, twig_template_get_attributes($this, isset($context["form"]) ? $context["form"] : null, "advanced", array()), "html", null, true));
echo "\n </div>\n <div class=\"layout-region layout-region-node-footer\">\n ";
// line 26
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, twig_template_get_attributes($this, isset($context["form"]) ? $context["form"] : null, "actions", array()), "html", null, true));
echo "\n </div>\n</div>\n";
}
开发者ID:mikekeilty,项目名称:seventen-marketing-website,代码行数:30,代码来源:91a5f75fced5e083757ff17f198c12287226d9333f8536453d85862f21089991.php
示例11: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$__internal_e1940b593956ae6f342389aed5be826172d45f378e712b8a8b705a22cc93a994 = $this->env->getExtension("native_profiler");
$__internal_e1940b593956ae6f342389aed5be826172d45f378e712b8a8b705a22cc93a994->enter($__internal_e1940b593956ae6f342389aed5be826172d45f378e712b8a8b705a22cc93a994_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "TwigBundle:Exception:logs.html.twig"));
// line 1
echo "<ol class=\"traces logs\">\n ";
// line 2
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable(isset($context["logs"]) ? $context["logs"] : $this->getContext($context, "logs"));
foreach ($context['_seq'] as $context["_key"] => $context["log"]) {
// line 3
echo " <li";
if (twig_template_get_attributes($this, $context["log"], "priority", array()) >= 400) {
echo " class=\"error\"";
} elseif (twig_template_get_attributes($this, $context["log"], "priority", array()) >= 300) {
echo " class=\"warning\"";
}
echo ">\n ";
// line 4
echo twig_escape_filter($this->env, twig_template_get_attributes($this, $context["log"], "priorityName", array()), "html", null, true);
echo " - ";
echo twig_escape_filter($this->env, twig_template_get_attributes($this, $context["log"], "message", array()), "html", null, true);
echo "\n </li>\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['log'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 7
echo "</ol>\n";
$__internal_e1940b593956ae6f342389aed5be826172d45f378e712b8a8b705a22cc93a994->leave($__internal_e1940b593956ae6f342389aed5be826172d45f378e712b8a8b705a22cc93a994_prof);
}
开发者ID:RuntyCybin,项目名称:csymfony,代码行数:31,代码来源:2043cfb906bb7a8b01833e9eea9364ace86aba12e2497988421736ff8894.php
示例12: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$__internal_de1335451d803f7f52c92fe52b5646b10e1a66670ce8461037b110b6770dac3e = $this->env->getExtension("native_profiler");
$__internal_de1335451d803f7f52c92fe52b5646b10e1a66670ce8461037b110b6770dac3e->enter($__internal_de1335451d803f7f52c92fe52b5646b10e1a66670ce8461037b110b6770dac3e_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "@Twig/Exception/logs.html.twig"));
// line 1
echo "<ol class=\"traces logs\">\n ";
// line 2
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(isset($context["logs"]) ? $context["logs"] : $this->getContext($context, "logs"));
foreach ($context['_seq'] as $context["_key"] => $context["log"]) {
// line 3
echo " <li";
if (twig_template_get_attributes($this, $context["log"], "priority", array()) >= 400) {
echo " class=\"error\"";
} elseif (twig_template_get_attributes($this, $context["log"], "priority", array()) >= 300) {
echo " class=\"warning\"";
}
echo ">\n ";
// line 4
echo twig_escape_filter($this->env, twig_template_get_attributes($this, $context["log"], "priorityName", array()), "html", null, true);
echo " - ";
echo twig_escape_filter($this->env, twig_template_get_attributes($this, $context["log"], "message", array()), "html", null, true);
echo "\n </li>\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['log'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 7
echo "</ol>\n";
$__internal_de1335451d803f7f52c92fe52b5646b10e1a66670ce8461037b110b6770dac3e->leave($__internal_de1335451d803f7f52c92fe52b5646b10e1a66670ce8461037b110b6770dac3e_prof);
}
开发者ID:RuntyCybin,项目名称:CProject,代码行数:31,代码来源:5f9334afba98bfc1182b38d52728fd0059c5eb211e76d226a63f8fc56f3a0bd4.php
示例13: block_body
public function block_body($context, array $blocks = array())
{
$__internal_4da3a15e31e13bc6c7a2711f0964bba1381c9fc3ee1e83fcb236ec17cfdaa658 = $this->env->getExtension("native_profiler");
$__internal_4da3a15e31e13bc6c7a2711f0964bba1381c9fc3ee1e83fcb236ec17cfdaa658->enter($__internal_4da3a15e31e13bc6c7a2711f0964bba1381c9fc3ee1e83fcb236ec17cfdaa658_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "body"));
// line 4
echo "<h1>Post list</h1>\n\n <thead>\n <tr>\n <th>Id</th>\n <th>Name</th>\n <th>Dni</th>\n <th>Age</th>\n <th>Active</th>\n <th>Created</th>\n <th>Updated</th>\n <th>Actions</th>\n </tr>\n </thead>\n <tbody>\n ";
// line 19
$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["entity"]) {
// line 20
echo " <tr>\n <td><a href=\"";
// line 21
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_show", array("id" => twig_template_get_attributes($this, $context["entity"], "id", array()))), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_template_get_attributes($this, $context["entity"], "id", array()), "html", null, true);
echo "</a></td>\n <td>";
// line 22
echo twig_escape_filter($this->env, twig_template_get_attributes($this, $context["entity"], "name", array()), "html", null, true);
echo "</td>\n <td>";
// line 23
echo twig_escape_filter($this->env, twig_template_get_attributes($this, $context["entity"], "dni", array()), "html", null, true);
echo "</td>\n <td>";
// line 24
echo twig_escape_filter($this->env, twig_template_get_attributes($this, $context["entity"], "age", array()), "html", null, true);
echo "</td>\n <td>";
// line 25
echo twig_escape_filter($this->env, twig_template_get_attributes($this, $context["entity"], "active", array()), "html", null, true);
echo "</td>\n <td>";
// line 26
if (twig_template_get_attributes($this, $context["entity"], "created", array())) {
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_template_get_attributes($this, $context["entity"], "created", array()), "Y-m-d H:i:s"), "html", null, true);
}
echo "</td>\n <td>";
// line 27
if (twig_template_get_attributes($this, $context["entity"], "updated", array())) {
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_template_get_attributes($this, $context["entity"], "updated", array()), "Y-m-d H:i:s"), "html", null, true);
}
echo "</td>\n <td>\n <ul>\n <li>\n <a type=\"button\" class=\"btn btn-info btn-xs\" href=\"";
// line 31
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_show", array("id" => twig_template_get_attributes($this, $context["entity"], "id", array()))), "html", null, true);
echo "\">show</a>\n </li>\n <li>\n <a type=\"button\" class=\"btn btn-warning btn-xs\" href=\"";
// line 34
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_edit", array("id" => twig_template_get_attributes($this, $context["entity"], "id", array()))), "html", null, true);
echo "\">edit</a>\n </li>\n </ul>\n </td>\n </tr>\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entity'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 40
echo " </tbody>\n\n <ul>\n <li>\n <a type=\"button\" href=\"";
// line 44
echo $this->env->getExtension('routing')->getPath("_new");
echo "\" class=\"btn btn-success\">Create a new entry</a>\n \n </li>\n </ul>\n ";
$__internal_4da3a15e31e13bc6c7a2711f0964bba1381c9fc3ee1e83fcb236ec17cfdaa658->leave($__internal_4da3a15e31e13bc6c7a2711f0964bba1381c9fc3ee1e83fcb236ec17cfdaa658_prof);
}
开发者ID:RuntyCybin,项目名称:csymfony,代码行数:56,代码来源:d24649ee94357369ab14d40aaf1cab5cbb7acd074fc24d44e1bf44a8d02b.php
示例14: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$tags = array("if" => 16, "for" => 18, "set" => 24, "trans" => 25);
$filters = array();
$functions = array("path" => 24);
try {
$this->env->getExtension('sandbox')->checkSecurity(array('if', 'for', 'set', 'trans'), array(), array('path'));
} catch (Twig_Sandbox_SecurityError $e) {
$e->setTemplateFile($this->getTemplateName());
if ($e instanceof Twig_Sandbox_SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
// line 16
if (isset($context["content"]) ? $context["content"] : null) {
// line 17
echo " <ul class=\"admin-list\">\n ";
// line 18
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(isset($context["types"]) ? $context["types"] : null);
foreach ($context['_seq'] as $context["_key"] => $context["type"]) {
// line 19
echo " <li class=\"clearfix\"><a href=\"";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, twig_template_get_attributes($this, $context["type"], "url", array()), "html", null, true));
echo "\"><span class=\"label\">";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, twig_template_get_attributes($this, $context["type"], "label", array()), "html", null, true));
echo "</span><div class=\"description\">";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, twig_template_get_attributes($this, $context["type"], "description", array()), "html", null, true));
echo "</div></a></li>\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['type'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
echo " </ul>\n";
} else {
// line 23
echo " <p>\n ";
// line 24
$context["create_content"] = $this->env->getExtension('drupal_core')->getPath("node.type_add");
// line 25
echo " ";
echo t("You have not created any content types yet. Go to the <a href=\"@create_content\">content type creation page</a> to add a new content type.", array("@create_content" => isset($context["create_content"]) ? $context["create_content"] : null));
// line 28
echo " </p>\n";
}
}
开发者ID:mikekeilty,项目名称:seventen-marketing-website,代码行数:52,代码来源:1411f508a4b187c75845de1c4aea13ff9d782ef5f88a0dfec8b8feb508a8ee91.php
示例15: block_title
public function block_title($context, array $blocks = array())
{
$__internal_54acae8fdde1f8c5c0efd102b5ff3bfd98dd17e6e061ec5b1d066eae8b9f52f3 = $this->env->getExtension("native_profiler");
$__internal_54acae8fdde1f8c5c0efd102b5ff3bfd98dd17e6e061ec5b1d066eae8b9f52f3->enter($__internal_54acae8fdde1f8c5c0efd102b5ff3bfd98dd17e6e061ec5b1d066eae8b9f52f3_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "title"));
// line 8
echo " ";
echo twig_escape_filter($this->env, twig_template_get_attributes($this, isset($context["exception"]) ? $context["exception"] : $this->getContext($context, "exception"), "message", array()), "html", null, true);
echo " (";
echo twig_escape_filter($this->env, isset($context["status_code"]) ? $context["status_code"] : $this->getContext($context, "status_code"), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, isset($context["status_text"]) ? $context["status_text"] : $this->getContext($context, "status_text"), "html", null, true);
echo ")\n";
$__internal_54acae8fdde1f8c5c0efd102b5ff3bfd98dd17e6e061ec5b1d066eae8b9f52f3->leave($__internal_54acae8fdde1f8c5c0efd102b5ff3bfd98dd17e6e061ec5b1d066eae8b9f52f3_prof);
}
开发者ID:RuntyCybin,项目名称:CProject,代码行数:14,代码来源:91b0507fc261533b51016fa97a9c5951d25608a548b6479367e3d7ee917bce96.php