本文整理汇总了PHP中twig_test_iterable函数的典型用法代码示例。如果您正苦于以下问题:PHP twig_test_iterable函数的具体用法?PHP twig_test_iterable怎么用?PHP twig_test_iterable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了twig_test_iterable函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
// line 3
$context["value"] = !$this->getAttribute(isset($context["field"]) ? $context["field"] : null, "key", array()) && twig_test_iterable(isset($context["value"]) ? $context["value"] : null) ? $this->env->getExtension('GantryTwig')->valuesFilter(isset($context["value"]) ? $context["value"] : null) : (isset($context["value"]) ? $context["value"] : null);
// line 1
$this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
}
开发者ID:joseclavijo,项目名称:gsclube,代码行数:7,代码来源:74e9cbebdaf9984c65ef7c7b73b057c6d220ec08a3dc778dce566cf92795591c.php
示例2: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
// line 3
$context["option"] = array("uses" => twig_test_iterable($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "uses", array(), "any", true, true) ? _twig_default_filter($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "uses", array()), array()) : array()) ? $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "uses", array(), "any", true, true) ? _twig_default_filter($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "uses", array()), array()) : array() : array(0 => $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "uses", array())), "viewless" => $this->getAttribute($this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "content", array(), "any", false, true), "contenttype", array(), "any", false, true), "viewless", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "content", array(), "any", false, true), "contenttype", array(), "any", false, true), "viewless", array()), false) : false);
// line 10
$context["attr_slug"] = array("class" => "form-control", "id" => isset($context["key"]) ? $context["key"] : null, "name" => isset($context["name"]) ? $context["name"] : null, "type" => "hidden", "value" => $this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "content", array()), "get", array(0 => isset($context["key"]) ? $context["key"] : null), "method"));
// line 22
$context["fieldset"] = array("slug" => array("contentId" => $this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "content", array()), "id", array()), "isEmpty" => $this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "content", array()), "get", array(0 => isset($context["contentkey"]) ? $context["contentkey"] : null), "method") == "", "key" => isset($context["key"]) ? $context["key"] : null, "slug" => $this->getAttribute($this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "content", array()), "contenttype", array()), "slug", array()), "uses" => $this->getAttribute(isset($context["option"]) ? $context["option"] : null, "uses", array())));
// line 20
$this->parent->display($context, array_merge($this->blocks, $blocks));
}
开发者ID:wolbodo,项目名称:pixelsite,代码行数:11,代码来源:83cf64ef4e2491d89792b8e04a900617a020c9b7999ce0190b83426c4722de63.php
示例3: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
// line 1
echo "<div class=\"ai1ec-pagination ai1ec-btn-group\">\n\t";
// line 2
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable(isset($context["links"]) ? $context["links"] : null);
foreach ($context['_seq'] as $context["_key"] => $context["link"]) {
// line 3
echo "\t\t";
if (twig_test_iterable(isset($context["link"]) ? $context["link"] : null)) {
// line 4
echo "\t\t\t<a class=\"";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["link"]) ? $context["link"] : null, "class"), "html", null, true);
echo " ai1ec-load-view ai1ec-btn ai1ec-btn-sm\n\t\t\t\tai1ec-btn-default ";
// line 5
if (!$this->getAttribute(isset($context["link"]) ? $context["link"] : null, "enabled")) {
echo "ai1ec-disabled";
}
echo "\"\n\t\t\t\t";
// line 6
echo isset($context["data_type"]) ? $context["data_type"] : null;
echo "\n\t\t\t\thref=\"";
// line 7
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["link"]) ? $context["link"] : null, "href"), "html_attr");
echo "\">\n\t\t\t\t";
// line 8
echo $this->getAttribute(isset($context["link"]) ? $context["link"] : null, "text");
echo "\n\t\t\t</a>\n\t\t";
} else {
// line 11
echo "\t\t\t";
echo isset($context["link"]) ? $context["link"] : null;
echo "\n\t\t";
}
// line 13
echo "\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['link'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 14
echo "</div>\n";
}
开发者ID:USSLomaPrieta,项目名称:usslomaprieta.org,代码行数:44,代码来源:e9ebb965697e227fa8ba7991946a80bc34917fe8e437edbc0c4567956326.php
示例4: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
// line 1
$context["originalValue"] = array_key_exists("originalValue", $context) ? isset($context["originalValue"]) ? $context["originalValue"] : null : (isset($context["value"]) ? $context["value"] : null);
// line 2
$context["value"] = null === (isset($context["value"]) ? $context["value"] : null) ? $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "default", array()) : (isset($context["value"]) ? $context["value"] : null);
// line 3
$context["vertical"] = $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "style", array()) == "vertical";
// line 4
echo "\n";
// line 5
if ($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "yaml", array()) && twig_test_iterable(isset($context["value"]) ? $context["value"] : null)) {
// line 6
echo " ";
$context["value"] = $this->env->getExtension('AdminTwigExtension')->toYamlFilter(isset($context["value"]) ? $context["value"] : null);
}
// line 8
echo "\n";
// line 9
$this->displayBlock('field', $context, $blocks);
}
开发者ID:tylerhebel,项目名称:oklahoma,代码行数:21,代码来源:d4e5afeb178533fce5908981c054836ac1675505f346fada4d9b6681e47cb740.php
示例5: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
// line 1
if (twig_test_iterable(isset($context["value"]) ? $context["value"] : null)) {
// line 2
echo " <span class=\"badge\">";
echo twig_escape_filter($this->env, twig_length_filter($this->env, isset($context["value"]) ? $context["value"] : null), "html", null, true);
echo "</span>\n";
} elseif (array_key_exists("link_parameters", $context)) {
// line 4
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("easyadmin", twig_array_merge(isset($context["link_parameters"]) ? $context["link_parameters"] : null, array("referer" => $this->getAttribute($this->getAttribute(isset($context["app"]) ? $context["app"] : null, "request", array()), "requestUri", array())))), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->env->getExtension('easyadmin_extension')->truncateText($this->env, isset($context["value"]) ? $context["value"] : null), "html", null, true);
echo "</a>\n";
} else {
// line 6
echo " ";
echo twig_escape_filter($this->env, $this->env->getExtension('easyadmin_extension')->truncateText($this->env, isset($context["value"]) ? $context["value"] : null), "html", null, true);
echo "\n";
}
}
开发者ID:karolskora1993,项目名称:strona-przedszkola,代码行数:22,代码来源:abbfd8047146a2f6554ecce3c6c572431f6b6a13f1dd4fbc96688ae66ca2ffcf.php
示例6: block_field
public function block_field($context, array $blocks = array())
{
$__internal_3f15a00397c7c0ec35906300d84cfa28eb0e8a65164a3b22727b0703c628e4eb = $this->env->getExtension("native_profiler");
$__internal_3f15a00397c7c0ec35906300d84cfa28eb0e8a65164a3b22727b0703c628e4eb->enter($__internal_3f15a00397c7c0ec35906300d84cfa28eb0e8a65164a3b22727b0703c628e4eb_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "field"));
// line 14
ob_start();
// line 15
echo " ";
if ($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "choices", array(), "any", true, true)) {
// line 16
echo " ";
if ($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "multiple", array(), "any", true, true) && $this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options", array()), "multiple", array()) == true && twig_test_iterable(isset($context["value"]) ? $context["value"] : $this->getContext($context, "value"))) {
// line 17
echo "\n ";
// line 18
$context["result"] = "";
// line 19
echo " ";
$context["delimiter"] = $this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "delimiter", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "delimiter", array()), ", ") : ", ";
// line 20
echo "\n ";
// line 21
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(isset($context["value"]) ? $context["value"] : $this->getContext($context, "value"));
foreach ($context['_seq'] as $context["_key"] => $context["val"]) {
// line 22
echo " ";
if (!twig_test_empty(isset($context["result"]) ? $context["result"] : $this->getContext($context, "result"))) {
// line 23
echo " ";
$context["result"] = (isset($context["result"]) ? $context["result"] : $this->getContext($context, "result")) . (isset($context["delimiter"]) ? $context["delimiter"] : $this->getContext($context, "delimiter"));
// line 24
echo " ";
}
// line 25
echo "\n ";
// line 26
if ($this->getAttribute($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "choices", array(), "any", false, true), $context["val"], array(), "array", true, true)) {
// line 27
echo " ";
if (!$this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "catalogue", array(), "any", true, true)) {
// line 28
echo " ";
$context["result"] = (isset($context["result"]) ? $context["result"] : $this->getContext($context, "result")) . $this->getAttribute($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options", array()), "choices", array()), $context["val"], array(), "array");
// line 29
echo " ";
} else {
// line 30
echo " ";
$context["result"] = (isset($context["result"]) ? $context["result"] : $this->getContext($context, "result")) . $this->env->getExtension('translator')->trans($this->getAttribute($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options", array()), "choices", array()), $context["val"], array(), "array"), array(), $this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options", array()), "catalogue", array()));
// line 31
echo " ";
}
// line 32
echo " ";
} else {
// line 33
echo " ";
$context["result"] = (isset($context["result"]) ? $context["result"] : $this->getContext($context, "result")) . $context["val"];
// line 34
echo " ";
}
// line 35
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['val'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 36
echo "\n ";
// line 37
$context["value"] = isset($context["result"]) ? $context["result"] : $this->getContext($context, "result");
// line 38
echo "\n ";
} elseif (twig_in_filter(isset($context["value"]) ? $context["value"] : $this->getContext($context, "value"), twig_get_array_keys_filter($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options", array()), "choices", array())))) {
// line 40
echo " ";
if (!$this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "catalogue", array(), "any", true, true)) {
// line 41
echo " ";
$context["value"] = $this->getAttribute($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options", array()), "choices", array()), isset($context["value"]) ? $context["value"] : $this->getContext($context, "value"), array(), "array");
// line 42
echo " ";
} else {
// line 43
echo " ";
$context["value"] = $this->env->getExtension('translator')->trans($this->getAttribute($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options", array()), "choices", array()), isset($context["value"]) ? $context["value"] : $this->getContext($context, "value"), array(), "array"), array(), $this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options", array()), "catalogue", array()));
// line 44
echo " ";
}
// line 45
echo " ";
}
// line 46
echo " ";
}
// line 47
echo "\n ";
// line 48
if ($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options", array()), "safe", array())) {
//.........这里部分代码省略.........
开发者ID:stuckiest,项目名称:SymfonyBlog,代码行数:101,代码来源:772cba9650789a9c8d57cbdf5c661cc93fdbc0681420c20fc6a924bd37946faf.php
示例7: block_content
public function block_content($context, array $blocks = array())
{
// line 18
echo "<form action=\"\" method=\"post\">\n ";
// line 19
if ($this->getAttribute(isset($context["errors"]) ? $context["errors"] : null, "timeUnavailable", array(), "any", true, true)) {
// line 20
echo " <span class=\"error\">";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["errors"]) ? $context["errors"] : null, "timeUnavailable", array()), "html", null, true);
echo "</span><br>\n ";
}
// line 22
echo " ";
// line 23
echo " ";
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["errors"]) ? $context["errors"] : null, "employee_id", array()));
foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
// line 24
echo " <span class=\"error\">";
echo twig_escape_filter($this->env, $context["error"], "html", null, true);
echo "</span><br>\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 26
echo " ";
if (twig_test_iterable(isset($context["creator"]) ? $context["creator"] : null)) {
// line 27
echo " <select name=\"employee_id\" class=\"input\">\n ";
// line 28
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable(isset($context["creator"]) ? $context["creator"] : 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["person"]) {
// line 29
echo " ";
if ($this->getAttribute($context["loop"], "first", array())) {
// line 30
echo " <option value=\"";
echo twig_escape_filter($this->env, $this->getAttribute($context["person"], "id", array()), "html", null, true);
echo "\"";
if ($this->getAttribute(isset($context["values"]) ? $context["values"] : null, "employee_id", array()) == $this->getAttribute($context["person"], "id", array())) {
echo " selected";
}
echo ">Me</option>\n ";
} else {
// line 32
echo " <option value=\"";
echo twig_escape_filter($this->env, $this->getAttribute($context["person"], "id", array()), "html", null, true);
echo "\"";
if ($this->getAttribute(isset($context["values"]) ? $context["values"] : null, "employee_id", array()) == $this->getAttribute($context["person"], "id", array())) {
echo " selected";
}
echo ">";
echo twig_escape_filter($this->env, $this->getAttribute($context["person"], "last_name", array()), "html", null, true);
echo ", ";
echo twig_escape_filter($this->env, $this->getAttribute($context["person"], "first_name", array()), "html", null, true);
if (!twig_test_empty($this->getAttribute($context["person"], "middle_name", array()))) {
echo " ";
echo twig_escape_filter($this->env, twig_first($this->env, $this->getAttribute($context["person"], "middle_name", array())), "html", null, true);
echo ".";
}
echo "</option>\n ";
}
// line 34
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['person'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 35
echo " </select><br>\n ";
} else {
// line 37
echo " <input type=\"hidden\" name=\"employee_id\" value=\"";
echo twig_escape_filter($this->env, isset($context["creator"]) ? $context["creator"] : null, "html", null, true);
echo "\">\n ";
}
// line 39
echo " ";
// line 40
echo " ";
$context['_parent'] = (array) $context;
//.........这里部分代码省略.........
开发者ID:adiachenko,项目名称:booker,代码行数:101,代码来源:dc8398e6f5c6fec324abc8e1056f1beacad6d8989499215b7c134c84e9ef.php
示例8: getfield
public function getfield($__setting__ = null, $__index__ = -1)
{
$context = $this->env->mergeGlobals(array("setting" => $__setting__, "index" => $__index__));
$blocks = array();
ob_start();
try {
// line 18
echo "\n ";
// line 19
if ((isset($context["index"]) ? $context["index"] : $this->getContext($context, "index")) == -1) {
// line 20
echo " ";
$context["index"] = $this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "getName", array());
// line 21
echo " ";
}
// line 22
echo "\n ";
// line 23
$context["settingValue"] = $this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "getValue", array());
// line 24
echo "\n ";
// line 25
if ($this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "uiControlType", array()) != "checkbox") {
// line 26
echo " <label>";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "title", array()), "html", null, true);
echo "</label>\n ";
}
// line 28
echo "\n ";
// line 29
if ($this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "inlineHelp", array())) {
// line 30
echo " <div class=\"form-help\">\n ";
// line 31
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "inlineHelp", array()), "html", null, true);
echo "\n ";
// line 32
if ($this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "defaultValue", array()) && $this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "uiControlType", array()) != "checkbox" && $this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "uiControlType", array()) != "radio") {
// line 33
echo " <br/>\n ";
// line 34
echo twig_escape_filter($this->env, call_user_func_array($this->env->getFilter('translate')->getCallable(), array("General_Default")), "html", null, true);
echo ":\n ";
// line 35
if (twig_test_iterable($this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "defaultValue", array()))) {
// line 36
echo " ";
echo twig_escape_filter($this->env, call_user_func_array($this->env->getFilter('truncate')->getCallable(), array(twig_join_filter($this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "defaultValue", array()), ", "), 50)), "html", null, true);
echo "\n ";
} else {
// line 38
echo " ";
echo twig_escape_filter($this->env, call_user_func_array($this->env->getFilter('truncate')->getCallable(), array($this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "defaultValue", array()), 50)), "html", null, true);
echo "\n ";
}
// line 40
echo " ";
}
// line 41
echo " </div>\n ";
}
// line 43
echo "\n ";
// line 44
if ($this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "uiControlType", array()) == "select" || $this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "uiControlType", array()) == "multiselect") {
// line 45
echo " <select\n ";
// line 46
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "uiControlAttributes", array()));
foreach ($context['_seq'] as $context["attr"] => $context["val"]) {
// line 47
echo " ";
echo twig_escape_filter($this->env, $context["attr"], "html_attr");
echo "=\"";
echo twig_escape_filter($this->env, $context["val"], "html_attr");
echo "\"\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['attr'], $context['val'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 49
echo " name=\"";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "getKey", array()), "html_attr");
echo "\"\n ";
// line 50
if ($this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "uiControlType", array()) == "multiselect") {
echo "multiple";
}
echo ">\n\n ";
// line 52
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["setting"]) ? $context["setting"] : $this->getContext($context, "setting"), "availableValues", array()));
foreach ($context['_seq'] as $context["key"] => $context["value"]) {
// line 53
echo " <option value='";
echo twig_escape_filter($this->env, $context["key"], "html", null, true);
echo "'\n ";
//.........这里部分代码省略.........
开发者ID:CaptainSharf,项目名称:SSAD_Project,代码行数:101,代码来源:8fc809df735bee23873dca0c7e287af512427cada3ae44b6de132edf95d833f4.php
示例9: block_global_attributes
public function block_global_attributes($context, array $blocks = array())
{
// line 4
echo " ";
$context["variations"] = $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(isset($context["gantry"]) ? $context["gantry"] : null, "theme", array()), "details", array()), "configuration", array()), "block-variations", array(), "array");
// line 5
echo " ";
$context["Options"] = $this->getAttribute($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "selectize", array()), "Options", array());
// line 6
echo " ";
$context["Optgroups"] = $this->getAttribute($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "selectize", array()), "Optgroups", array());
// line 7
echo " ";
$context["options"] = array();
// line 8
echo " ";
$context["optgroups"] = array();
// line 9
echo " ";
if (isset($context["variations"]) ? $context["variations"] : null) {
// line 10
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(isset($context["variations"]) ? $context["variations"] : null);
foreach ($context['_seq'] as $context["key"] => $context["text"]) {
// line 11
echo " ";
if (twig_test_iterable($context["text"])) {
// line 12
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($context["text"]);
foreach ($context['_seq'] as $context["item_key"] => $context["item_text"]) {
// line 13
echo " ";
$context["options"] = twig_array_merge(isset($context["options"]) ? $context["options"] : null, array(0 => array("optgroup" => $context["key"], "value" => $context["item_key"], "text" => $context["item_text"])));
// line 14
echo " ";
if (!twig_in_filter($context["key"], isset($context["optgroups"]) ? $context["optgroups"] : null)) {
$context["optgroups"] = twig_array_merge(isset($context["optgroups"]) ? $context["optgroups"] : null, array(0 => array("value" => $context["key"], "label" => $context["key"])));
}
// line 15
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['item_key'], $context['item_text'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " ";
} else {
// line 17
echo " ";
$context["options"] = twig_array_merge(isset($context["options"]) ? $context["options"] : null, array(0 => array("value" => $context["key"], "text" => $context["text"])));
// line 18
echo " ";
}
// line 19
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['key'], $context['text'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 20
echo "\n\n ";
// line 22
$context["field"] = twig_array_merge(twig_array_merge(twig_array_merge(isset($context["field"]) ? $context["field"] : null, $this->getAttribute($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "selectize", array(), "any", false, true), "Options", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "selectize", array(), "any", false, true), "Options", array()), array()) : array()), $this->getAttribute($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "selectize", array(), "any", false, true), "Optgroups", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "selectize", array(), "any", false, true), "Optgroups", array()), array()) : array()), array("selectize" => array("Options" => isset($context["options"]) ? $context["options"] : null, "Optgroups" => isset($context["optgroups"]) ? $context["optgroups"] : null)));
// line 23
echo " ";
}
// line 24
echo "\n data-selectize=\"";
// line 25
echo $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "selectize", array(), "any", true, true) ? twig_escape_filter($this->env, twig_jsonencode_filter($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "selectize", array())), "html_attr") : "";
echo "\"\n ";
// line 26
$this->displayParentBlock("global_attributes", $context, $blocks);
echo "\n";
}
开发者ID:mazykin46,项目名称:portfolio,代码行数:78,代码来源:e9e823bcae0301f3c81c7f808304c273548fc29f35ae249eaca1e0b5aeac963b.php
示例10: block_field
public function block_field($context, array $blocks = array())
{
// line 15
ob_start();
// line 16
echo " ";
if ($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "choices", array(), "any", true, true)) {
// line 17
echo " ";
if ($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "multiple", array(), "any", true, true) && $this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options"), "multiple") == true && twig_test_iterable(isset($context["value"]) ? $context["value"] : $this->getContext($context, "value"))) {
// line 18
echo "\n ";
// line 19
$context["result"] = "";
// line 20
echo " ";
$context["delimiter"] = $this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "delimiter", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "delimiter"), ", ") : ", ";
// line 21
echo "\n ";
// line 22
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable(isset($context["value"]) ? $context["value"] : $this->getContext($context, "value"));
foreach ($context['_seq'] as $context["_key"] => $context["val"]) {
// line 23
echo " ";
if (!twig_test_empty(isset($context["result"]) ? $context["result"] : $this->getContext($context, "result"))) {
// line 24
echo " ";
$context["result"] = (isset($context["result"]) ? $context["result"] : $this->getContext($context, "result")) . (isset($context["delimiter"]) ? $context["delimiter"] : $this->getContext($context, "delimiter"));
// line 25
echo " ";
}
// line 26
echo "\n ";
// line 27
if ($this->getAttribute($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "choices", array(), "any", false, true), isset($context["val"]) ? $context["val"] : $this->getContext($context, "val"), array(), "array", true, true)) {
// line 28
echo " ";
if (!$this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "catalogue", array(), "any", true, true)) {
// line 29
echo " ";
$context["result"] = (isset($context["result"]) ? $context["result"] : $this->getContext($context, "result")) . $this->getAttribute($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options"), "choices"), isset($context["val"]) ? $context["val"] : $this->getContext($context, "val"), array(), "array");
// line 30
echo " ";
} else {
// line 31
echo " ";
$context["result"] = (isset($context["result"]) ? $context["result"] : $this->getContext($context, "result")) . $this->env->getExtension('translator')->trans($this->getAttribute($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options"), "choices"), isset($context["val"]) ? $context["val"] : $this->getContext($context, "val"), array(), "array"), array(), $this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options"), "catalogue"));
// line 32
echo " ";
}
// line 33
echo " ";
} else {
// line 34
echo " ";
$context["result"] = (isset($context["result"]) ? $context["result"] : $this->getContext($context, "result")) . (isset($context["val"]) ? $context["val"] : $this->getContext($context, "val"));
// line 35
echo " ";
}
// line 36
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['val'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 37
echo "\n ";
// line 38
$context["value"] = isset($context["result"]) ? $context["result"] : $this->getContext($context, "result");
// line 39
echo "\n ";
} elseif (twig_in_filter(isset($context["value"]) ? $context["value"] : $this->getContext($context, "value"), twig_get_array_keys_filter($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options"), "choices")))) {
// line 41
echo " ";
if (!$this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "catalogue", array(), "any", true, true)) {
// line 42
echo " ";
$context["value"] = $this->getAttribute($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options"), "choices"), isset($context["value"]) ? $context["value"] : $this->getContext($context, "value"), array(), "array");
// line 43
echo " ";
} else {
// line 44
echo " ";
$context["value"] = $this->env->getExtension('translator')->trans($this->getAttribute($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options"), "choices"), isset($context["value"]) ? $context["value"] : $this->getContext($context, "value"), array(), "array"), array(), $this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options"), "catalogue"));
// line 45
echo " ";
}
// line 46
echo " ";
}
// line 47
echo " ";
}
// line 48
echo "\n ";
// line 49
echo twig_escape_filter($this->env, isset($context["value"]) ? $context["value"] : $this->getContext($context, "value"), "html", null, true);
echo "\n";
echo trim(preg_replace('/>\\s+</', '><', ob_get_clean()));
//.........这里部分代码省略.........
开发者ID:serialken,项目名称:BugTracker,代码行数:101,代码来源:67bd77739d7b03e30b3197f0a482e059286ce03d0dae9c3bc02095b2fe39.php
示例11: getchangelog_details
//.........这里部分代码省略.........
if (!$this->getAttribute($context["loop"], "last", array())) {
// line 164
echo " <br>\n ";
}
// line 166
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['image'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 167
echo " </td>\n ";
} elseif ($this->getAttribute($context["field"], "type", array()) == "markdown" || $this->getAttribute($context["field"], "type", array()) == "textarea") {
// line 169
echo " <td class=\"change-log-item\">\n <pre style=\"white-space: pre-wrap; background-color: inherit; border: 0;\">";
// line 170
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($context["field"], "before", array()), "render", array()), "html", null, true);
echo "</pre>\n </td>\n <td class=\"change-log-item\">\n <pre style=\"white-space: pre-wrap; background-color: inherit; border: 0;\">";
// line 173
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($context["field"], "after", array()), "render", array()), "html", null, true);
echo "</pre>\n </td>\n ";
} elseif ($this->getAttribute($context["field"], "type", array()) == "select") {
// line 176
echo " <td class=\"change-log-item\">\n ";
// line 177
if (twig_test_iterable($this->getAttribute($this->getAttribute($context["field"], "before", array()), "render", array()))) {
// line 178
echo " <ul>\n ";
// line 179
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($context["field"], "before", array()), "render", array()));
foreach ($context['_seq'] as $context["_key"] => $context["select"]) {
// line 180
echo " <li>";
echo twig_escape_filter($this->env, $context["select"], "html", null, true);
echo "</li>\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['select'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 182
echo " </ul>\n ";
} else {
// line 184
echo " ";
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($context["field"], "before", array()), "render", array()), "html", null, true);
echo "\n ";
}
// line 186
echo " </td>\n <td class=\"change-log-item\">\n ";
// line 188
if (twig_test_iterable($this->getAttribute($this->getAttribute($context["field"], "after", array()), "render", array()))) {
// line 189
echo " <ul>\n ";
// line 190
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($context["field"], "after", array()), "render", array()));
foreach ($context['_seq'] as $context["_key"] => $context["select"]) {
开发者ID:wolbodo,项目名称:pixelsite,代码行数:67,代码来源:373a9c9fccfa2205791b0a95a92f03c3657b73f231a8dc74695d981a65ba1642.php
示例12: block_content
public function block_content($context, array $blocks = array())
{
// line 18
echo "<form action=\"\" method=\"post\">\n ";
// line 19
if ($this->getAttribute(isset($context["errors"]) ? $context["errors"] : null, "timeUnavailable", array(), "any", true, true)) {
// line 20
echo " <span class=\"error\">";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["errors"]) ? $context["errors"] : null, "timeUnavailable", array()), "html", null, true);
echo "</span><br>\n ";
}
// line 22
echo " ";
// line 23
echo " ";
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["errors"]) ? $context["errors"] : null, "employee_id", array()));
foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
// line 24
echo " <span class=\"error\">";
echo twig_escape_filter($this->env, $context["error"], "html", null, true);
echo "</span><br>\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 26
echo " ";
if (twig_test_iterable(isset($context["creator"]) ? $context["creator"] : null)) {
// line 27
echo " <select name=\"employee_id\" class=\"input\">\n ";
// line 28
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable(isset($context["creator"]) ? $context["creator"] : 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["person"]) {
// line 29
echo " ";
if ($this->getAttribute($context["loop"], "first", array())) {
// line 30
echo " <option value=\"";
echo twig_escape_filter($this->env, $this->getAttribute($context["person"], "id", array()), "html", null, true);
echo "\"";
if ($this->getAttribute(isset($context["values"]) ? $context["values"] : null, "employee_id", array()) == $this->getAttribute($context["person"], "id", array())) {
echo " selected";
}
echo ">Me</option>\n ";
} else {
// line 32
echo " <option value=\"";
echo twig_escape_filter($this->env, $this->getAttribute($context["person"], "id", array()), "html", null, true);
echo "\"";
if ($this->getAttribute(isset($context["values"]) ? $context["values"] : null, "employee_id", array()) == $this->getAttribute($context["person"], "id", array())) {
echo " selected";
}
echo ">";
echo twig_escape_filter($this->env, $this->getAttribute($context["person"], "last_name", array()), "html", null, true);
echo ", ";
echo twig_escape_filter($this->env, $this->getAttribute($context["person"], "first_name", array()), "html", null, true);
if (!twig_test_empty($this->getAttribute($context["person"], "middle_name", array()))) {
echo " ";
echo twig_escape_filter($this->env, twig_first($this->env, $this->getAttribute($context["person"], "middle_name", array())), "html", null, true);
echo ".";
}
echo "</option>\n ";
}
// line 34
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['person'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 35
echo " </select><br>\n ";
} else {
// line 37
echo " <input type=\"hidden\" name=\"employee_id\" value=\"";
echo twig_escape_filter($this->env, isset($context["creator"]) ? $context["creator"] : null, "html", null, true);
echo "\">\n ";
}
// line 39
echo " ";
// line 40
echo " ";
$context['_parent'] = (array) $context;
//.........这里部分代码省略.........
开发者ID:adiachenko,项目名称:booker,代码行数:101,代码来源:4796540cd055939a8742b978039c50dff0859379f6fae9c6279483351e9b.php
示例13: block_panel_body
public function block_panel_body($context, array $blocks = array())
{
// line 13
echo " <a class=\"btn btn-primary\" href=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("editcontent", array("contenttypeslug" => $this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "contenttype", array()), "slug", array()))), "html", null, true);
echo "\">\n <i class=\"fa fa-plus\"></i> ";
// line 14
echo $this->env->getExtension('Bolt')->trans("contenttypes.generic.new", array("%contenttype%" => $this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "contenttype", array()), "slug", array())));
echo "\n </a>\n\n <p style=\"margin-top: 15px;\"><strong>";
// line 17
echo $this->env->getExtension('Bolt')->trans("Filter");
echo "</strong></p>\n\n <form class=\"form-inline\">\n\n ";
// line 21
$context["taxonomyfilter"] = false;
// line 22
echo "\n <div class=\"form-group\">\n ";
// line 24
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "contenttype", array(), "any", false, true), "taxonomy", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "contenttype", array(), "any", false, true), "taxonomy", array()), array()) : array());
foreach ($context['_seq'] as $context["_key"] => $context["taxonomy"]) {
// line 25
echo " ";
if (twig_test_iterable($this->getAttribute($this->getAttribute(isset($context["app"]) ? $context["app"] : null, "config", array()), "get", array(0 => "taxonomy/" . $context["taxonomy"] . "/options"), "method"))) {
// line 26
echo " ";
if ($this->env->getExtension('Bolt')->request("taxonomy-" . $context["taxonomy"])) {
// line 27
echo " ";
$context["taxonomyfilter"] = true;
// line 28
echo " ";
}
// line 29
echo " <select name='taxonomy-";
echo twig_escape_filter($this->env, $context["taxonomy"], "html", null, true);
echo "' class='form-control'>\n <option value=''>\n (";
// line 31
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["app"]) ? $context["app"] : null, "config", array(), "any", false, true), "get", array(0 => "taxonomy/" . $context["taxonomy"] . "/name"), "method", true, true) ? _twig_default_filter($this->getAttribute($this->getAttribute(isset($context["app"]) ? $context["app"] : null, "config", array(), "any", false, true), "get", array(0 => "taxonomy/" . $context["taxonomy"] . "/name"), "method"), $context["taxonomy"]) : $context["taxonomy"], "html", null, true);
echo ")\n </option>\n ";
// line 33
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute(isset($context["app"]) ? $context["app"] : null, "config", array()), "get", array(0 => "taxonomy/" . $context["taxonomy"] . "/options"), "method"));
foreach ($context['_seq'] as $context["slug"] => $context["name"]) {
// line 34
echo " <option value='";
echo twig_escape_filter($this->env, $context["slug"], "html", null, true);
echo "' ";
if ($this->env->getExtension('Bolt')->request("taxonomy-" . $context["taxonomy"]) == $context["slug"]) {
echo "selected";
}
echo ">\n ";
// line 35
echo twig_escape_filter($this->env, $context["name"], "html", null, true);
echo "\n </option>\n ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['slug'], $context['name'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 38
echo " </select>\n ";
// line 39
echo $this->env->getExtension('Bolt')->trans("or");
echo "\n ";
}
// line 41
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['taxonomy'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 42
echo " <input type=\"text\" class=\"form-control\" value=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('Bolt')->request("filter", "", true), "html", null, true);
echo "\" name=\"filter\" style=\"width: 110px;\" placeholder=\"";
echo $this->env->getExtension('Bolt')->trans("Keyword …");
echo "\">\n </div>\n\n <div class=\"form-group\" style=\"display: block; margin-top: 12px;\">\n <button type=\"submit\" class=\"btn btn-tertiary\"><i class=\"fa fa-filter\"></i> ";
// line 46
echo $this->env->getExtension('Bolt')->trans("Filter");
echo "</button>\n\n ";
// line 48
if ($this->env->getExtension('Bolt')->request("filter") || $this->env->getExtension('Bolt')->request("order") || (isset($context["taxonomyfilter"]) ? $context["taxonomyfilter"] : null)) {
// line 49
echo " <a class=\"btn btn-tertiary\" href=\"?\"><i class=\"fa fa-close\"></i> ";
echo $this->env->getExtension('Bolt')->trans("Clear sort/filter");
echo "</a>\n ";
}
// line 51
echo " </div>\n\n </form>\n\n\n ";
// line 56
$context["description"] = $this->env->getExtension('Bolt')->trans(array(0 => "contenttypes", 1 => $this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "contenttype", array()), "slug", array()), 2 => "description"), array("DEFAULT" => $this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "contenttype", array(), "any", false, true), "description", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "contenttype", array(), "any", false, true), "description", array())) : ""));
// line 57
echo " <div class=\"description\">\n ";
// line 58
if (isset($context["description"]) ? $context["description"] : null) {
// line 59
echo " ";
echo $this->env->getExtension('Bolt')->markdown(isset($context["description"]) ? $context["description"] : null);
echo "\n ";
}
// line 61
//.........这里部分代码省略.........
开发者ID:wolbodo,项目名称:pixelsite,代码行数:101,代码来源:d6ba6652dc224f1fa555fda1cc1c46d1ff2698ea56222b06afa397dc4b078739.php
示例14: doDisplay
//.........这里部分代码省略.........
echo twig_escape_filter($this->env, $this->getAttribute($context["value"], "latitude", array()), "html", null, true);
echo ",";
echo twig_escape_filter($this->env, $this->getAttribute($context["value"], "longitude", array()), "html", null, true);
echo "\">\n </div>\n <p>";
// line 53
echo twig_escape_filter($this->env, $this->getAttribute($context["value"], "formatted_address", array()), "html", null, true);
echo "</p>\n\n ";
} elseif (twig_in_filter($this->getAttribute(isset($context["record"]) ? $context["record"] : null, "fieldtype", array(0 => $context["key"]), "method"), array(0 => "html", 1 => "markdown", 2 => "textarea"))) {
// line 56
echo "\n <div data-bolt-field=\"";
// line 57
echo twig_escape_filter($this->env, $context["key"], "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["record"]) ? $context["record"] : null, $context["key"]), "html", null, true);
echo "</div>\n\n ";
} elseif ($this->getAttribute(isset($context["record"]) ? $context["record"] : null, "fieldtype", array(0 => $context["key"]), "method") == "select") {
// line 60
echo "\n ";
// line 62
echo " <p><strong>";
echo twig_escape_filter($this->env, $context["key"], "html", null, true);
echo ": </strong>\n ";
// line 63
echo twig_escape_filter($this->env, twig_join_filter($this->getAttribute(isset($context["record"]) ? $context["record"] : null, $context["key"]), ", "), "html", null, true);
echo "\n </p>\n\n ";
} elseif (!twig_in_filter($this->getAttribute(isset($context["record"]) ? $context["record"] : null, "fieldtype", array(0 => $context["key"]), "method"), array(0 => "templateselect")) && !twig_test_empty($this->getAttribute(isset($context["record"]) ? $context["record"] : null, $context["key"]))) {
// line 67
echo "\n ";
// line 70
echo " <p><strong>";
echo twig_escape_filter($this->env, $context["key"], "html", null, true);
echo ": </strong>\n ";
// line 71
if (twig_test_iterable($this->getAttribute(isset($context["record"]) ? $context["record"] : null, $context["key"]))) {
// line 72
echo " ";
echo twig_escape_filter($this->env, $this->env->getExtension('Bolt')->printDump($this->getAttribute(isset($context["record"]) ? $context["record"] : null, $context["key"])), "html", null, true);
echo "\n ";
} else {
// line 74
echo " ";
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["record"]) ? $context["record"] : null, $context["key"]), "html", null, true);
echo "\n ";
}
// line 76
echo " </p>\n\n ";
}
// line 79
echo "\n ";
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['key'], $context['value'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 81
echo "\n ";
// line 85
echo "\n ";
// line 86
$this->loadTemplate("_recordfooter.twig", "record.twig", 86)->display(array_merge($context, array("record" => isset($context["record"]) ? $context["record"] : null)));
// line 87
echo "\n <p class=\"meta\">\n ";
// line 89
$context["previous"] = $this->getAttribute(isset($context["record"]) ? $context["record"] : null, "previous", array(0 => "id"), "method");
// line 90
echo " ";
开发者ID:wolbodo,项目名称:pixelsite,代码行数:67,代码来源:58c93c04a42ae295a9d02df5a8d3ff7ca480bc82d898bc42021549a7fc1fc74e.php
示例15: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
// line 2
echo "\n";
// line 3
$context["option"] = array("class" => $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "class", array(), "any", true, true) ? _twig_default_filter($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "class", array()), "") : "", "label" => $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "label", array(), "any", true, true) ? _twig_default_filter($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "label", array()), "") : "", "multiple" => $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "multiple", array(), "any", true, true) && $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "multiple", array()), "values" => $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "values", array(), "any", true, true) ? _twig_default_filter($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "values", array()), array()) : array(), "info" => $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "info", array(), "any", true, true) ? _twig_default_filter($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "info", array()), "") : "");
// line 10
echo "\n";
// line 12
echo "\n";
// line 13
if (twig_test_iterable($this->getAttribute(isset($context["option"]) ? $context["option"] : null, "values", array()))) {
// line 14
echo " ";
$context["values"] = $this->getAttribute(isset($context["option"]) ? $context["option"] : null, "values", array());
} else {
// line 16
echo " ";
$context["lookuptype"] = $this->env->getExtension('Bolt')->first(twig_split_filter($this->env, $this->getAttribute(isset($context["option"]) ? $context["option"] : null, "values", array()), "/"));
// line 17
echo " ";
$context["lookupfield"] = $this->env->getExtension('Bolt')->last(twig_split_filter($this->env, $this->getAttribute(isset($context["option"]) ? $context["option"] : null, "values", array()), "/"));
// line 18
echo " ";
if (twig_in_filter(",", isset($context["lookupfield"]) ? $context["lookupfield"] : null)) {
// line 19
echo " ";
$context["lookupfield"] = twig_split_filter($this->env, isset($context["lookupfield"]) ? $context["lookupfield"] : null, ",");
// line 20
echo " ";
}
// line 21
echo " ";
$context["sortingorder"] = $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "sort", array(), "any", true, true) ? _twig_default_filter($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "sort", array()), $this->env->getExtension('Bolt')->first(isset($context["lookupfield"]) ? $context["lookupfield"] : null)) : $this->env->getExtension('Bolt')->first(isset($context["lookupfield"]) ? $context["lookupfield"] : null);
// line 22
echo " ";
$context["querylimit"] = $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "limit", array(), "any", true, true) ? _twig_default_filter($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "limit", array()), 500) : 500;
// line 23
echo " ";
$context["wherefilter"] = $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "filter", array(), "any", true, true) ? _twig_default_filter($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "filter", array()), array()) : array();
// line 24
echo " ";
$template_storage = new Bolt\Storage($context['app']);
$context['lookups'] = $template_storage->getContent(isset($context["lookuptype"]) ? $context["lookuptype"] : null, array("order" => isset($context["sortingorder"]) ? $context["sortingorder"] : null, "hydrate" => false, "limit" => isset($context["querylimit"]) ? $context["querylimit"] : null), $pager, isset($context["wherefilter"]) ? $context["wherefilter"] : null);
// line 25
echo " ";
$context["values"] = $this->env->getExtension('Bolt')->selectField(isset($context["lookups"]) ? $context["lookups"] : null, isset($context["lookupfield"]) ? $context["lookupfield"] : null, $this->getAttribute(isset($context["option"]) ? $context["option"] : null, "multiple", array()), $this->getAttribute(isset($context["field"]) ? $context["field"] : null, "keys", array(), "any", true, true) ? _twig_default_filter($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "keys", array()), "id") : "id");
}
// line 27
echo "\n";
// line 29
$context["selection"] = $this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "content", array(), "any", false, true), "get", array(0 => isset($context["contentkey"]) ? $context["contentkey"] : null), "method", true, true) ? _twig_default_filter($this->getAttribute($this->getAttribute(isset($context["context"]) ? $context["context"] : null, "content", array(), "any", false, true), "get", array(0 => isset($context["contentkey"]) ? $context["contentkey"] : null), "method"), null) : null;
// line 30
if (!twig_test_iterable(isset($context["selection"]) ? $context["selection"] : null)) {
// line 31
echo " ";
$context["selection"] = array(0 => isset($context["selection"]) ? $context["selection"] : null);
}
// line 33
echo "\n";
// line 35
if (twig_in_filter($this->env->getExtension('Bolt')->first(isset($context["selection"]) ? $context["selection"] : null), twig_get_array_keys_filter(isset($context["values"]) ? $context["values"] : null))) {
// line 36
echo " ";
$context["onlyids"] = true;
} else {
// line 38
echo " ";
$context["onlyids"] = false;
}
// line 40
echo "\n";
// line 41
$context["attr_select"] = array("class" => $this->getAttribute(isset($context["option"]) ? $context["option"] : null, "class", array()), "id" => isset($context["key"]) ? $context["key"] : null, "multiple" => $this->getAttribute(isset($context["option"]) ? $context["option"] : null, "multiple", array()), "name" => $this->getAttribute(isset($context["option"]) ? $context["option"] : null, "multiple", array()) ? (isset($context["name"]) ? $context["name"] : null) . "[]" : (isset($context["name"]) ? $context["name"] : null));
// line 47
echo "\n";
// line 49
if ($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "autocomplete", array(), "any", true, true) ? _twig_default_filter($this->getAttribute(isset($context["field"]) ? $context["field"] : null, "autocomplete", array()), false) : false) {
// line 50
echo " ";
$context["attr_select"] = twig_array_merge(isset($context["attr_select"]) ? $context["attr_select"] : null, array("class" => ""));
// line 51
echo " ";
$context["attr_select"] = twig_array_merge(isset($context["attr_select"]) ? $context["attr_select"] : null, array("style" => "width: 100%;"));
}
// line 53
echo "\n";
// line 55
echo "\n<fieldset class=\"multiselect\">\n\n <label class=\"col-sm-3 control-label\">";
// line 58
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["option"]) ? $context["option"] : null, "info", array()) ? $this->getAttribute(isset($context["macro"]) ? $context["macro"] : null, "infopop", array(0 => isset($context["labelkey"]) ? $context["labelkey"] : null, 1 => $this->getAttribute(isset($context["option"]) ? $context["option"] : null, "info", array())), "method") : (isset($context["labelkey"]) ? $context["labelkey"] : null), "html", null, true);
echo "</label>\n <div class=\"col-sm-9\">\n <select";
// line 60
echo twig_escape_filter($this->env, $this->getAttribute(isset($context["macro"]) ? $context["macro"] : null, "attr", array(0 => isset($context["attr_select"]) ? $context["attr_select"] : null), "method"), "html", null, true);
echo ">\n ";
// line 61
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(isset($context["values"]) ? $context["values"] : null);
foreach ($context['_seq'] as $context["id"] => $context["value"]) {
// line 62
//.........这里部分代码省略.........
开发者ID:bearlikelion,项目名称:im,代码行数:101,代码来源:ea0f442ce3f168d59bfb55755f89a1ddb7a3d190c37458f2565b442fcd7f953c.php