• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP twig_test_iterable函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了twig_test_iterable函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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-> 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP twig_title_string_filter函数代码示例发布时间:2022-05-23
下一篇:
PHP twig_test_empty函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap