本文整理汇总了PHP中twig_cycle函数的典型用法代码示例。如果您正苦于以下问题:PHP twig_cycle函数的具体用法?PHP twig_cycle怎么用?PHP twig_cycle使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了twig_cycle函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: block_body
public function block_body($context, array $blocks = array())
{
$__internal_facf89bf103b265016bb964b1dcc2d890575cc43890641196d04e29af959f6d2 = $this->env->getExtension("native_profiler");
$__internal_facf89bf103b265016bb964b1dcc2d890575cc43890641196d04e29af959f6d2->enter($__internal_facf89bf103b265016bb964b1dcc2d890575cc43890641196d04e29af959f6d2_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "body"));
// line 5
echo " <h1>Lucky Numbers: ";
echo twig_escape_filter($this->env, isset($context["luckyNumberList"]) ? $context["luckyNumberList"] : $this->getContext($context, "luckyNumberList"), "html", null, true);
echo "</h1>\n ";
// line 6
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable(range(0, 10));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 7
echo "\t <div class=\"";
echo twig_escape_filter($this->env, twig_cycle(array(0 => "odd", 1 => "even"), $context["i"]), "html", null, true);
echo "\">\n\t ";
// line 8
echo twig_escape_filter($this->env, $context["i"], "html", null, true);
echo "\n\t </div>\n\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
$__internal_facf89bf103b265016bb964b1dcc2d890575cc43890641196d04e29af959f6d2->leave($__internal_facf89bf103b265016bb964b1dcc2d890575cc43890641196d04e29af959f6d2_prof);
}
开发者ID:johnsnow91,项目名称:myBlog,代码行数:25,代码来源:9e0bb8f50e2b233ecc188cd08bfc325b27e8db9301f06ad2f4b2c5498a49e01a.php
示例2: block_panel
public function block_panel($context, array $blocks = array())
{
// line 28
echo " <h2>Logs</h2>\n\n ";
// line 30
if ($this->getAttribute($this->getContext($context, "collector"), "logs")) {
// line 31
echo " <ul class=\"alt\">\n ";
// line 32
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, "collector"), "logs"));
$context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["log"]) {
// line 33
echo " <li class=\"";
echo twig_escape_filter($this->env, twig_cycle(array(0 => "odd", 1 => "even"), $this->getAttribute($this->getContext($context, "loop"), "index")), "html", null, true);
if ("ERR" == $this->getAttribute($this->getContext($context, "log"), "priorityName") || "ERROR" == $this->getAttribute($this->getContext($context, "log"), "priorityName")) {
echo " error";
}
echo "\">\n ";
// line 34
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "log"), "message"), "html", null, true);
echo "\n ";
// line 35
if ($this->getAttribute($this->getContext($context, "log", true), "context", array(), "any", true, true) && !twig_test_empty($this->getAttribute($this->getContext($context, "log"), "context"))) {
// line 36
echo " <br />\n <small>\n <strong>Context</strong>: ";
// line 38
echo twig_escape_filter($this->env, $this->env->getExtension('yaml')->encode($this->getAttribute($this->getContext($context, "log"), "context")), "html", null, true);
echo "\n </small>\n ";
}
// line 41
echo " </li>\n ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['log'], $context['_parent'], $context['loop']);
$context = array_merge($_parent, array_intersect_key($context, $_parent));
// line 43
echo " </ul>\n ";
} else {
// line 45
echo " <p>\n <em>No logs available.</em>\n </p>\n ";
}
}
开发者ID:richpolis,项目名称:sf2Pruebas,代码行数:59,代码来源:ef9c4101016e5b680f9820276ded.php
示例3: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
// line 3
echo "\n<div>\n ";
// line 5
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable(isset($context["comments"]) ? $context["comments"] : $this->getContext($context, "comments"));
$context['_iterated'] = false;
$context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["comment"]) {
// line 6
echo " <article class=\"comment ";
echo twig_escape_filter($this->env, twig_cycle(array(0 => "odd", 1 => "even"), $this->getAttribute(isset($context["loop"]) ? $context["loop"] : $this->getContext($context, "loop"), "index0")), "html", null, true);
echo "\" id=\"comment-";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["comment"]) ? $context["comment"] : $this->getContext($context, "comment"), "id"), "html", null, true);
echo "\">\n <header class=\"ici02\">\n <p><span class=\"highlight\">";
// line 8
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["comment"]) ? $context["comment"] : $this->getContext($context, "comment"), "usuario"), "html", null, true);
echo "</span> ha comentado hace <time datetime=\"";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute(isset($context["comment"]) ? $context["comment"] : $this->getContext($context, "comment"), "creado"), "c"), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, strtr($this->env->getExtension('JMPC_PetFriends_Protectors_extension')->createdAgo($this->getAttribute(isset($context["comment"]) ? $context["comment"] : $this->getContext($context, "comment"), "creado")), array("minutes ago" => "minutos")), "html", null, true);
echo "</time></p>\n </header>\n <p>";
// line 10
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["comment"]) ? $context["comment"] : $this->getContext($context, "comment"), "comentarios"), "html", null, true);
echo "</p>\n </article>\n ";
$context['_iterated'] = true;
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
if (!$context['_iterated']) {
// line 13
echo " <p>No hay comentarios en esta entrada, Escribe tu comentario...</p>\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['comment'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 15
echo " <div class=\"paginacion\">\n ";
// line 16
echo $this->env->getExtension('knp_pagination')->render(isset($context["comments"]) ? $context["comments"] : $this->getContext($context, "comments"));
echo "\n </div>\n</div>\n";
}
开发者ID:Checo1983,项目名称:petfriends,代码行数:56,代码来源:0f73676d75ba996c5d70ad218a5f5ce07a7042b54f6246f5d3a4920fb31e.php
示例4: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
// line 2
echo "\n";
// line 3
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getContext($context, "comments"));
$context['_iterated'] = false;
$context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["comment"]) {
// line 4
echo " <article class=\"comment ";
echo twig_escape_filter($this->env, twig_cycle(array(0 => "odd", 1 => "even"), $this->getAttribute($this->getContext($context, "loop"), "index0")), "html", null, true);
echo "\" id=\"comment-";
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "comment"), "id"), "html", null, true);
echo "\">\n <header>\n <p><span class=\"highlight\">";
// line 6
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "comment"), "user"), "html", null, true);
echo "</span> commented <time datetime=\"";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($this->getContext($context, "comment"), "created"), "c"), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($this->getContext($context, "comment"), "created"), "l, F j, Y"), "html", null, true);
echo "</time></p>\n </header>\n <p>";
// line 8
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "comment"), "comment"), "html", null, true);
echo "</p>\n </article>\n";
$context['_iterated'] = true;
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
if (!$context['_iterated']) {
// line 11
echo " <p>There are no comments for this post. Be the first to comment...</p>\n";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['comment'], $context['_parent'], $context['loop']);
$context = array_merge($_parent, array_intersect_key($context, $_parent));
// line 13
echo " \n ";
}
开发者ID:richpolis,项目名称:sf2Pruebas,代码行数:53,代码来源:d3857b36130f2bbff33147b803be.php
示例5: block_panel
public function block_panel($context, array $blocks = array())
{
// line 24
echo " <h2>Queries</h2>\n\n ";
// line 26
if (!$this->getAttribute($this->getContext($context, "collector"), "queries")) {
// line 27
echo " <p>\n <em>Query logging is disabled.</em>\n <p>\n ";
} elseif (!$this->getAttribute($this->getContext($context, "collector"), "querycount")) {
// line 31
echo " <p>\n <em>No queries.</em>\n </p>\n ";
} else {
// line 35
echo " <ul class=\"alt\">\n ";
// line 36
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, "collector"), "queries"));
$context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["query"]) {
// line 37
echo " <li class=\"";
echo twig_escape_filter($this->env, twig_cycle(array(0 => "odd", 1 => "even"), $this->getAttribute($this->getContext($context, "loop"), "index")), "html", null, true);
echo "\">\n <div>\n <code>";
// line 39
echo twig_escape_filter($this->env, $this->getContext($context, "query"), "html", null, true);
echo "</code>\n </div>\n </li>\n ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['query'], $context['_parent'], $context['loop']);
$context = array_merge($_parent, array_intersect_key($context, $_parent));
// line 43
echo " </ul>\n ";
}
}
开发者ID:rfanjul,项目名称:sfMongoFacebookTwitter,代码行数:49,代码来源:c2559cd9cfd4d1c589fe0450373d.php
示例6: block_content
public function block_content($context, array $blocks = array())
{
// line 9
echo " <div id=\"jobs\">\n <table class=\"jobs\">\n ";
// line 11
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getContext($context, "entities"));
$context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["entity"]) {
// line 12
echo " <tr class=\"";
echo twig_escape_filter($this->env, twig_cycle(array(0 => "even", 1 => "odd"), $this->getAttribute($this->getContext($context, "loop"), "index")), "html", null, true);
echo "\">\n <td class=\"location\">";
// line 13
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entity"), "location"), "html", null, true);
echo "</td>\n <td class=\"position\">\n <a href=\"";
// line 15
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("ens_job_show", array("id" => $this->getAttribute($this->getContext($context, "entity"), "id"))), "html", null, true);
echo "\">\n ";
// line 16
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entity"), "position"), "html", null, true);
echo "\n </a>\n </td>\n <td class=\"company\">";
// line 19
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "entity"), "company"), "html", null, true);
echo "</td>\n </tr>\n ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entity'], $context['_parent'], $context['loop']);
$context = array_merge($_parent, array_intersect_key($context, $_parent));
// line 22
echo " </table>\n </div>\n";
}
开发者ID:richpolis,项目名称:sf2Pruebas,代码行数:47,代码来源:23a55f5858bf931016006a84297b.php
示例7: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
// line 1
echo "<table class=\"jobs\">\n ";
// line 2
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(isset($context["jobs"]) ? $context["jobs"] : $this->getContext($context, "jobs"));
$context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["entity"]) {
// line 3
echo " <tr class=";
echo twig_escape_filter($this->env, twig_cycle(array(0 => "even", 1 => "odd"), $this->getAttribute($context["loop"], "index", array())), "html", null, true);
echo ">\n <td class=\"location\">";
// line 4
echo twig_escape_filter($this->env, $this->getAttribute($context["entity"], "location", array()), "html", null, true);
echo "</td>\n <td class=\"position\">\n <a href=";
// line 6
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("erlem_job_show", array("id" => $this->getAttribute($context["entity"], "id", array()), "company" => $this->getAttribute($context["entity"], "companyslug", array()), "location" => $this->getAttribute($context["entity"], "locationslug", array()), "position" => $this->getAttribute($context["entity"], "positionslug", array()))), "html", null, true);
echo ">\n ";
// line 7
echo twig_escape_filter($this->env, $this->getAttribute($context["entity"], "position", array()), "html", null, true);
echo "\n </a>\n </td>\n <td class=\"company\">";
// line 10
echo twig_escape_filter($this->env, $this->getAttribute($context["entity"], "company", array()), "html", null, true);
echo "</td>\n </tr>\n ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entity'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 13
echo "</table>";
}
开发者ID:nfouka,项目名称:jobbet_sf2.5,代码行数:47,代码来源:8b2c14f12f465728ea6d3d6c6315dd6d46ad38088695ed1c2a9b8a6fc857ba14.php
示例8: block_body
public function block_body($context, array $blocks = array())
{
// line 5
echo " \n<h1>Calculadora básica:</h1>\n\n<label for=\"ab\">Valores pasados como parámetros</label><br>\n<label for=\"a\">VALOR A</label>\n<input type=\"text\" name=\"a\" id=\"a\" value=";
// line 10
echo twig_escape_filter($this->env, isset($context["varA"]) ? $context["varA"] : $this->getContext($context, "varA"), "html", null, true);
echo "><br>\n<label for=\"b\">VALOR B</label>\n<input type=\"text\" name=\"b\" id=\"b\" value=";
// line 12
echo twig_escape_filter($this->env, isset($context["varB"]) ? $context["varB"] : $this->getContext($context, "varB"), "html", null, true);
echo "><br>\n\n<div>\n</div>\nEl resultado de la operación ";
// line 16
echo twig_escape_filter($this->env, isset($context["operacion"]) ? $context["operacion"] : $this->getContext($context, "operacion"), "html", null, true);
echo "<br> \n";
// line 17
echo twig_escape_filter($this->env, isset($context["varA"]) ? $context["varA"] : $this->getContext($context, "varA"), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, isset($context["operando"]) ? $context["operando"] : $this->getContext($context, "operando"), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, isset($context["varB"]) ? $context["varB"] : $this->getContext($context, "varB"), "html", null, true);
echo " es: ";
echo twig_escape_filter($this->env, isset($context["resultado"]) ? $context["resultado"] : $this->getContext($context, "resultado"), "html", null, true);
echo "<br>\n\n<br>\n<br>\n ";
// line 21
$context["frutas"] = array(0 => "manzana", 1 => "naranaja", 2 => "citricos");
// line 22
echo " ";
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable(range(0, 10));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 23
echo " ";
echo twig_escape_filter($this->env, (isset($context["i"]) ? $context["i"] : $this->getContext($context, "i")) . " " . twig_cycle(isset($context["frutas"]) ? $context["frutas"] : $this->getContext($context, "frutas"), isset($context["i"]) ? $context["i"] : $this->getContext($context, "i")), "html", null, true);
echo "\n <br>\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 26
echo " \n";
}
开发者ID:santiagosisul,项目名称:curso-sf2,代码行数:40,代码来源:d00a15794588e6aac2e62d87f441d940b1138a3c13d323894dc959f16093.php
示例9: doDisplay
//.........这里部分代码省略.........
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, $this->getAttribute($context["cell"], "content", array()), "html", null, true));
// line 70
echo "</";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, $this->getAttribute($context["cell"], "tag", array()), "html", null, true));
echo ">\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['cell'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 72
echo " </tr>\n </thead>\n ";
}
// line 75
echo "\n ";
// line 76
if (isset($context["rows"]) ? $context["rows"] : null) {
// line 77
echo " <tbody>\n ";
// line 78
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(isset($context["rows"]) ? $context["rows"] : null);
$context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["row"]) {
// line 79
echo " ";
// line 80
$context["row_classes"] = array(0 => !(isset($context["no_striping"]) ? $context["no_striping"] : null) ? twig_cycle(array(0 => "odd", 1 => "even"), $this->getAttribute($context["loop"], "index0", array())) : "");
// line 84
echo " <tr";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, $this->getAttribute($this->getAttribute($context["row"], "attributes", array()), "addClass", array(0 => isset($context["row_classes"]) ? $context["row_classes"] : null), "method"), "html", null, true));
echo ">\n ";
// line 85
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute($context["row"], "cells", array()));
foreach ($context['_seq'] as $context["_key"] => $context["cell"]) {
// line 86
echo " <";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, $this->getAttribute($context["cell"], "tag", array()), "html", null, true));
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, $this->getAttribute($context["cell"], "attributes", array()), "html", null, true));
echo ">";
// line 87
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, $this->getAttribute($context["cell"], "content", array()), "html", null, true));
// line 88
echo "</";
echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, $this->getAttribute($context["cell"], "tag", array()), "html", null, true));
echo ">\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['cell'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 90
echo " </tr>\n ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
开发者ID:neetumorwani,项目名称:dcon,代码行数:67,代码来源:afb11dc0750d453ef8d20ee1a139e52fed8d741753e61789ff47d5a66f2fbc8b.php
示例10: block_panel
public function block_panel($context, array $blocks = array())
{
// line 55
echo " <h2>Logs</h2>\n\n ";
// line 57
$context["priority"] = $this->getAttribute($this->getAttribute(isset($context["request"]) ? $context["request"] : $this->getContext($context, "request"), "query"), "get", array(0 => "priority", 1 => 0), "method");
// line 58
echo "\n <table>\n <tr>\n <th>Filter</th>\n <td>\n <form id=\"priority-form\" action=\"\" method=\"get\" style=\"display: inline\">\n <input type=\"hidden\" name=\"panel\" value=\"logger\">\n <label for=\"priority\">Min. Priority</label>\n <select id=\"priority\" name=\"priority\" onchange=\"document.getElementById('priority-form').submit(); \">\n ";
// line 68
echo " ";
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "priorities"));
foreach ($context['_seq'] as $context["value"] => $context["level"]) {
// line 69
echo " ";
if (!(isset($context["priority"]) ? $context["priority"] : $this->getContext($context, "priority")) && (isset($context["value"]) ? $context["value"] : $this->getContext($context, "value")) > 100) {
// line 70
echo " ";
$context["priority"] = isset($context["value"]) ? $context["value"] : $this->getContext($context, "value");
// line 71
echo " ";
}
// line 72
echo " <option value=\"";
echo twig_escape_filter($this->env, isset($context["value"]) ? $context["value"] : $this->getContext($context, "value"), "html", null, true);
echo "\"";
echo (isset($context["value"]) ? $context["value"] : $this->getContext($context, "value")) == (isset($context["priority"]) ? $context["priority"] : $this->getContext($context, "priority")) ? " selected" : "";
echo ">";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["level"]) ? $context["level"] : $this->getContext($context, "level"), "name"), "html", null, true);
echo " (";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["level"]) ? $context["level"] : $this->getContext($context, "level"), "count"), "html", null, true);
echo ")</option>\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['value'], $context['level'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 74
echo " ";
if ($this->getAttribute(isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "countdeprecations")) {
// line 75
echo " ";
if (!(isset($context["priority"]) ? $context["priority"] : $this->getContext($context, "priority"))) {
// line 76
echo " ";
$context["priority"] = "-100";
// line 77
echo " ";
}
// line 78
echo " <option value=\"-100\"";
echo "-100" == (isset($context["priority"]) ? $context["priority"] : $this->getContext($context, "priority")) ? " selected" : "";
echo ">DEPRECATION only (";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "countdeprecations"), "html", null, true);
echo ")</option>\n ";
}
// line 80
echo " </select>\n <noscript>\n <input type=\"submit\" value=\"refresh\">\n </noscript>\n </form>\n </td>\n </tr>\n </table>\n\n ";
// line 89
if ($this->getAttribute(isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "logs")) {
// line 90
echo " <ul class=\"alt\">\n ";
// line 91
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "logs"));
$context['_iterated'] = false;
$context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
foreach ($context['_seq'] as $context["_key"] => $context["log"]) {
if ((isset($context["priority"]) ? $context["priority"] : $this->getContext($context, "priority")) >= 0 && $this->getAttribute(isset($context["log"]) ? $context["log"] : $this->getContext($context, "log"), "priority") >= (isset($context["priority"]) ? $context["priority"] : $this->getContext($context, "priority")) || (isset($context["priority"]) ? $context["priority"] : $this->getContext($context, "priority")) < 0 && ($this->getAttribute($this->getAttribute(isset($context["log"]) ? $context["log"] : null, "context", array(), "any", false, true), "type", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($this->getAttribute(isset($context["log"]) ? $context["log"] : null, "context", array(), "any", false, true), "type"), 0) : 0) == (isset($context["priority"]) ? $context["priority"] : $this->getContext($context, "priority"))) {
// line 92
echo " <li class=\"";
echo twig_escape_filter($this->env, twig_cycle(array(0 => "odd", 1 => "even"), $this->getAttribute(isset($context["loop"]) ? $context["loop"] : $this->getContext($context, "loop"), "index")), "html", null, true);
if ($this->getAttribute(isset($context["log"]) ? $context["log"] : $this->getContext($context, "log"), "priority") >= 400) {
echo " error";
} elseif ($this->getAttribute(isset($context["log"]) ? $context["log"] : $this->getContext($context, "log"), "priority") >= 300) {
echo " warning";
}
if ($this->getAttribute($this->getAttribute(isset($context["log"]) ? $context["log"] : null, "context", array(), "any", false, true), "scream", array(), "any", true, true)) {
echo " scream";
}
echo "\">\n ";
// line 93
echo $context["logger"]->getdisplay_message($this->getAttribute(isset($context["loop"]) ? $context["loop"] : $this->getContext($context, "loop"), "index"), isset($context["log"]) ? $context["log"] : $this->getContext($context, "log"));
echo "\n </li>\n ";
$context['_iterated'] = true;
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
}
}
if (!$context['_iterated']) {
// line 96
echo " <li><em>No logs available for this priority.</em></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 98
echo " </ul>\n ";
} else {
// line 100
//.........这里部分代码省略.........
开发者ID:ancgate,项目名称:ldap_project,代码行数:101,代码来源:e499d8c074a9b8bdd278904665b95b1c51988d1c350592e07d27a6b8aa74.php
示例11: block_grid_search
public function block_grid_search($context, array $blocks = array())
{
// line 74
echo " ";
if ($this->getAttribute(isset($context["grid"]) ? $context["grid"] : $this->getContext($context, "grid"), "isFilterSectionVisible", array())) {
// line 75
echo " <div class=\"grid-search\">\n <form id=\"";
// line 76
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["grid"]) ? $context["grid"] : $this->getContext($context, "grid"), "hash", array()), "html", null, true);
echo "_search\" action=\"";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["grid"]) ? $context["grid"] : $this->getContext($context, "grid"), "routeUrl", array()), "html", null, true);
echo "\" method=\"post\">\n ";
// line 77
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["grid"]) ? $context["grid"] : $this->getContext($context, "grid"), "columns", array()));
$context['loop'] = array('parent' => $context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true);
if (is_array($context['_seq']) || is_object($context['_seq']) && $context['_seq'] instanceof Countable) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["column"]) {
// line 78
echo " ";
if ($this->getAttribute($context["column"], "isFilterable", array()) && !twig_in_filter($this->getAttribute($context["column"], "type", array()), array(0 => "actions", 1 => "massaction"))) {
// line 79
echo " ";
if ($this->getAttribute($context["column"], "usePrefixTitle", array()) == true) {
// line 80
echo " ";
$context["columnTitle"] = $this->getAttribute(isset($context["grid"]) ? $context["grid"] : $this->getContext($context, "grid"), "prefixTitle", array()) . $this->getAttribute($context["column"], "title", array());
// line 81
echo " ";
} else {
// line 82
echo " ";
$context["columnTitle"] = $this->getAttribute($context["column"], "title", array());
// line 83
echo " ";
}
// line 84
echo " <div class=\"";
echo twig_escape_filter($this->env, twig_cycle(array(0 => "odd", 1 => "even"), $this->getAttribute($context["loop"], "index", array())), "html", null, true);
echo "\"><label>";
echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans(isset($context["columnTitle"]) ? $context["columnTitle"] : $this->getContext($context, "columnTitle")), "html", null, true);
echo "</label>";
echo $this->env->getExtension('datagrid_twig_extension')->getGridFilter($context["column"], isset($context["grid"]) ? $context["grid"] : $this->getContext($context, "grid"), false);
echo "</div>\n ";
}
// line 86
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_paren
|
请发表评论