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


PHP twig_test_empty函数代码示例

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


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

示例1: block_form_label

 public function block_form_label($context, array $blocks = array())
 {
     $__internal_6fb545f92cf9bc753601ad7819c1a0d39961dd584b025c210f3a6986b7b4908e = $this->env->getExtension("native_profiler");
     $__internal_6fb545f92cf9bc753601ad7819c1a0d39961dd584b025c210f3a6986b7b4908e->enter($__internal_6fb545f92cf9bc753601ad7819c1a0d39961dd584b025c210f3a6986b7b4908e_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "form_label"));
     // line 25
     echo "    ";
     if (twig_test_empty(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label"))) {
         // line 26
         echo "        ";
         $context["label"] = $this->env->getExtension('form')->humanize(isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"));
         // line 27
         echo "    ";
     }
     // line 28
     echo "    <label for=\"";
     echo twig_escape_filter($this->env, isset($context["id"]) ? $context["id"] : $this->getContext($context, "id"), "html", null, true);
     echo "\">\n        ";
     // line 29
     echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label")), "html", null, true);
     echo "\n        ";
     // line 30
     if (isset($context["required"]) ? $context["required"] : $this->getContext($context, "required")) {
         // line 31
         echo "            <span class=\"symfony-form-required\" title=\"This field is required\">*</span>\n        ";
     }
     // line 33
     echo "    </label>\n";
     $__internal_6fb545f92cf9bc753601ad7819c1a0d39961dd584b025c210f3a6986b7b4908e->leave($__internal_6fb545f92cf9bc753601ad7819c1a0d39961dd584b025c210f3a6986b7b4908e_prof);
 }
开发者ID:johnsnow91,项目名称:myBlog,代码行数:29,代码来源:04d1463d6bddbdb8ced6edc0f50bb0611eaf67880e6015236a0fe921bb752aa8.php

示例2: block_form_label

 public function block_form_label($context, array $blocks = array())
 {
     $__internal_f3f643a880fb2ef1e7e431fdcb3ecd7a59cc73a4659abb91be83853878e08da3 = $this->env->getExtension("native_profiler");
     $__internal_f3f643a880fb2ef1e7e431fdcb3ecd7a59cc73a4659abb91be83853878e08da3->enter($__internal_f3f643a880fb2ef1e7e431fdcb3ecd7a59cc73a4659abb91be83853878e08da3_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "form_label"));
     // line 25
     echo "    ";
     if (twig_test_empty(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label"))) {
         // line 26
         echo "        ";
         $context["label"] = $this->env->getExtension('form')->humanize(isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"));
         // line 27
         echo "    ";
     }
     // line 28
     echo "    <label for=\"";
     echo twig_escape_filter($this->env, isset($context["id"]) ? $context["id"] : $this->getContext($context, "id"), "html", null, true);
     echo "\">\n        ";
     // line 29
     echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label")), "html", null, true);
     echo "\n        ";
     // line 30
     if (isset($context["required"]) ? $context["required"] : $this->getContext($context, "required")) {
         // line 31
         echo "            <span class=\"symfony-form-required\" title=\"This field is required\">*</span>\n        ";
     }
     // line 33
     echo "    </label>\n";
     $__internal_f3f643a880fb2ef1e7e431fdcb3ecd7a59cc73a4659abb91be83853878e08da3->leave($__internal_f3f643a880fb2ef1e7e431fdcb3ecd7a59cc73a4659abb91be83853878e08da3_prof);
 }
开发者ID:michaud1992,项目名称:TPWEB-Perillat-Michaud,代码行数:29,代码来源:cbe7c7ab3a40b113c6f13ddc91f331655f3d0ab64a2672dc58241eb41f426eb4.php

示例3: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     $tags = array("set" => 16, "if" => 23);
     $filters = array();
     $functions = array();
     try {
         $this->env->getExtension('sandbox')->checkSecurity(array('set', 'if'), array(), array());
     } catch (Twig_Sandbox_SecurityError $e) {
         $e->setTemplateFile($this->getTemplateName());
         if ($e instanceof Twig_Sandbox_SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
             $e->setTemplateLine($tags[$e->getTagName()]);
         } elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
             $e->setTemplateLine($filters[$e->getFilterName()]);
         } elseif ($e instanceof Twig_Sandbox_SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
             $e->setTemplateLine($functions[$e->getFunctionName()]);
         }
         throw $e;
     }
     // line 16
     $context["classes"] = array(0 => (isset($context["title_display"]) ? $context["title_display"] : null) == "after" ? "option" : "", 1 => (isset($context["title_display"]) ? $context["title_display"] : null) == "invisible" ? "visually-hidden" : "", 2 => isset($context["required"]) ? $context["required"] : null ? "js-form-required" : "", 3 => isset($context["required"]) ? $context["required"] : null ? "form-required" : "");
     // line 23
     if (!twig_test_empty(isset($context["title"]) ? $context["title"] : null) || (isset($context["required"]) ? $context["required"] : null)) {
         // line 24
         echo "<label";
         echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, $this->getAttribute(isset($context["attributes"]) ? $context["attributes"] : null, "addClass", array(0 => isset($context["classes"]) ? $context["classes"] : null), "method"), "html", null, true));
         echo ">";
         echo $this->env->getExtension('sandbox')->ensureToStringAllowed($this->env->getExtension('drupal_core')->escapeFilter($this->env, isset($context["title"]) ? $context["title"] : null, "html", null, true));
         echo "</label>";
     }
 }
开发者ID:briefmedia-digital,项目名称:drupal8,代码行数:30,代码来源:80949391a2c1de51e2d29927a924f3a289eb695fbb02d78faad8054017676861.php

示例4: block_form_label

 public function block_form_label($context, array $blocks = array())
 {
     $__internal_bd3da9424ae7b4db51e2bd10b7a8b68dde3e3e93c1834246b19e7401bda95f9b = $this->env->getExtension("native_profiler");
     $__internal_bd3da9424ae7b4db51e2bd10b7a8b68dde3e3e93c1834246b19e7401bda95f9b->enter($__internal_bd3da9424ae7b4db51e2bd10b7a8b68dde3e3e93c1834246b19e7401bda95f9b_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "form_label"));
     // line 25
     echo "    ";
     if (twig_test_empty(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label"))) {
         // line 26
         echo "        ";
         $context["label"] = $this->env->getExtension('form')->humanize(isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"));
         // line 27
         echo "    ";
     }
     // line 28
     echo "    <label for=\"";
     echo twig_escape_filter($this->env, isset($context["id"]) ? $context["id"] : $this->getContext($context, "id"), "html", null, true);
     echo "\">\n        ";
     // line 29
     echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label")), "html", null, true);
     echo "\n        ";
     // line 30
     if (isset($context["required"]) ? $context["required"] : $this->getContext($context, "required")) {
         // line 31
         echo "            <span class=\"symfony-form-required\" title=\"This field is required\">*</span>\n        ";
     }
     // line 33
     echo "    </label>\n";
     $__internal_bd3da9424ae7b4db51e2bd10b7a8b68dde3e3e93c1834246b19e7401bda95f9b->leave($__internal_bd3da9424ae7b4db51e2bd10b7a8b68dde3e3e93c1834246b19e7401bda95f9b_prof);
 }
开发者ID:ajoaugustine,项目名称:tracker,代码行数:29,代码来源:d93def2d7649d267dc0a9007b96af6f3a1a63716304de10780098ba9b328cb49.php

示例5: doDisplay

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "
";
        // line 2
        if ((array_key_exists("formErrors", $context) &&  !twig_test_empty((isset($context["formErrors"]) ? $context["formErrors"] : $this->getContext($context, "formErrors"))))) {
            // line 3
            echo "    <div class=\"message_error\">
        ";
            // line 4
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["formErrors"]) ? $context["formErrors"] : $this->getContext($context, "formErrors")));
            foreach ($context['_seq'] as $context["_key"] => $context["data"]) {
                // line 5
                echo "            <strong>";
                echo twig_escape_filter($this->env, call_user_func_array($this->env->getFilter('translate')->getCallable(), array("General_Error")), "html", null, true);
                echo "</strong>: ";
                echo $context["data"];
                echo "
            <br/>
        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['data'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 8
            echo "    </div>
";
        }
    }
开发者ID:sumanyaligar,项目名称:MyMagento--07-10-2015,代码行数:31,代码来源:01e2946abf3c6072891e5fb92773cb1aca46d19597d1e3bedd01c9f2f60d69b5.php

示例6: block_content

 public function block_content($context, array $blocks = array())
 {
     // line 8
     echo "    <table class=\"table table-bordered\">\n        <tr>\n            <th>ID</th>\n            <th>UserName</th>\n            <th>Email</th>\n            <th>Last Login</th>\n            <th>Active</th>\n            <th>Created At</th>\n            <th>#</th>\n        </tr>\n        ";
     // line 18
     if (array_key_exists("users", $context) && !twig_test_empty(isset($context["users"]) ? $context["users"] : $this->getContext($context, "users"))) {
         // line 19
         echo "            ";
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["users"]) ? $context["users"] : $this->getContext($context, "users"));
         foreach ($context['_seq'] as $context["_key"] => $context["user"]) {
             // line 20
             echo "                <tr>\n                    <td>";
             // line 21
             echo twig_escape_filter($this->env, $this->getAttribute($context["user"], "id", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($context["user"], "id", array()), "") : "", "html", null, true);
             echo "</td>\n                    <td>";
             // line 22
             echo twig_escape_filter($this->env, $this->getAttribute($context["user"], "username", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($context["user"], "username", array()), "") : "", "html", null, true);
             echo "</td>\n                    <td>";
             // line 23
             echo twig_escape_filter($this->env, $this->getAttribute($context["user"], "email", array(), "any", true, true) ? _twig_default_filter($this->getAttribute($context["user"], "email", array()), "") : "", "html", null, true);
             echo "</td>\n                    <td>";
             // line 24
             echo twig_escape_filter($this->env, $this->getAttribute($context["user"], "lastLogin", array(), "any", true, true) && !(null === $this->getAttribute($context["user"], "lastLogin", array())) ? twig_date_format_filter($this->env, $this->getAttribute($context["user"], "lastLogin", array())) : "", "html", null, true);
             echo "</td>\n                    <td>";
             // line 25
             echo $this->getAttribute($context["user"], "enabled", array(), "any", true, true) && $this->getAttribute($context["user"], "enabled", array()) ? "Yes" : "No";
             echo "</td>\n                    <td>";
             // line 26
             echo twig_escape_filter($this->env, _twig_default_filter(twig_date_format_filter($this->env, $this->getAttribute($context["user"], "createdAt", array())), ""), "html", null, true);
             echo "</td>\n                    <td>\n                        <ul class=\"nav nav-pills\">\n                            <li class=\"dropdown\">\n                                <a id=\"drop5\" role=\"button\" data-toggle=\"dropdown\" href=\"#\">Action <span class=\"caret\"></span></a>\n                                <ul id=\"menu2\" class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"drop5\">\n                                    <li role=\"presentation\"><a role=\"menuitem\" target=\"_blank\" tabindex=\"-1\" href=\"";
             // line 32
             echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("view_profile", array("id" => $this->getAttribute($this->getAttribute($context["user"], "profile", array()), "id", array()))), "html", null, true);
             echo "\">View</a></li>\n                                    ";
             // line 33
             if ($this->getAttribute($context["user"], "enabled", array(), "any", true, true) && $this->getAttribute($context["user"], "enabled", array())) {
                 // line 34
                 echo "                                        <li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"";
                 echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("admin_user_ban", array("id" => $this->getAttribute($context["user"], "id", array()))), "html", null, true);
                 echo "\">Disable</a></li>\n                                    ";
             } else {
                 // line 36
                 echo "                                        <li role=\"presentation\"><a role=\"menuitem\" tabindex=\"-1\" href=\"";
                 echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("admin_user_unban", array("id" => $this->getAttribute($context["user"], "id", array()))), "html", null, true);
                 echo "\">Enable</a></li>\n                                    ";
             }
             // line 38
             echo "                                        <li role=\"presentation\"><a role=\"menuitem\" onclick=\"return confirm('Are you sure?');\" tabindex=\"-1\" href=\"";
             echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("admin_user_delete", array("id" => $this->getAttribute($context["user"], "id", array()))), "html", null, true);
             echo "\">Delete</a></li>\n                                </ul>\n                            </li>\n                        </ul>\n                    </td>\n                </tr>\n            ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['user'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 45
         echo "        ";
     }
     // line 46
     echo "    </table>\n";
 }
开发者ID:Joomlamaster,项目名称:connectionru,代码行数:60,代码来源:72f71181be389066605dcbc3e0e6acb11943b0184cf0b79d321f92c36d51.php

示例7: block_form_label

 public function block_form_label($context, array $blocks = array())
 {
     $__internal_74c87a5ca4fa0a6996ea6fe08a6cb40a6b52e0de9387599c7c1325922c38a9d9 = $this->env->getExtension("native_profiler");
     $__internal_74c87a5ca4fa0a6996ea6fe08a6cb40a6b52e0de9387599c7c1325922c38a9d9->enter($__internal_74c87a5ca4fa0a6996ea6fe08a6cb40a6b52e0de9387599c7c1325922c38a9d9_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "form_label"));
     // line 25
     echo "    ";
     if (twig_test_empty(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label"))) {
         // line 26
         echo "        ";
         $context["label"] = $this->env->getExtension('form')->humanize(isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"));
         // line 27
         echo "    ";
     }
     // line 28
     echo "    <label for=\"";
     echo twig_escape_filter($this->env, isset($context["id"]) ? $context["id"] : $this->getContext($context, "id"), "html", null, true);
     echo "\">\n        ";
     // line 29
     echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label")), "html", null, true);
     echo "\n        ";
     // line 30
     if (isset($context["required"]) ? $context["required"] : $this->getContext($context, "required")) {
         // line 31
         echo "            <span class=\"symfony-form-required\" title=\"This field is required\">*</span>\n        ";
     }
     // line 33
     echo "    </label>\n";
     $__internal_74c87a5ca4fa0a6996ea6fe08a6cb40a6b52e0de9387599c7c1325922c38a9d9->leave($__internal_74c87a5ca4fa0a6996ea6fe08a6cb40a6b52e0de9387599c7c1325922c38a9d9_prof);
 }
开发者ID:noobest,项目名称:traduction,代码行数:29,代码来源:63d3f4e1934d69e57ce0870940495739dfd4c06c2fb132df967950c7623a5b65.php

示例8: block_main

 public function block_main($context, array $blocks = array())
 {
     // line 6
     echo "<article id=\"main\">\n\n    <header class=\"special container\">\n        <span class=\"icon ";
     // line 9
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["theme"]) ? $context["theme"] : null, "general", array()), "icon", array()), "html", null, true);
     echo "\"></span>\n        <h2>";
     // line 10
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["record"]) ? $context["record"] : null, "title", array()), "html", null, true);
     echo "</h2>\n        ";
     // line 11
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["record"]) ? $context["record"] : null, "teaser", array()), "html", null, true);
     echo "\n    </header>\n\n    <section class=\"wrapper style4 container\">\n        <div class=\"content\">\n            <section>\n                <a href=\"";
     // line 17
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["record"]) ? $context["record"] : null, "link", array()), "html", null, true);
     echo "\" class=\"image featured\"><img src=\"";
     echo twig_escape_filter($this->env, $this->env->getExtension('Bolt')->image($this->getAttribute(isset($context["record"]) ? $context["record"] : null, "image", array())), "html", null, true);
     echo "\" alt=\"\" /></a>\n                <header>\n                    <h3>";
     // line 19
     if (!twig_test_empty($this->getAttribute(isset($context["record"]) ? $context["record"] : null, "subtitle", array()))) {
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["record"]) ? $context["record"] : null, "subtitle", array()), "html", null, true);
     } else {
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["record"]) ? $context["record"] : null, "title", array()), "html", null, true);
     }
     echo "</h3>\n                </header>\n                ";
     // line 21
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["record"]) ? $context["record"] : null, "body", array()), "html", null, true);
     echo "\n            </section>\n        </div>\n    </section>\n\n    ";
     // line 26
     $this->loadTemplate("_row.twig", "record.twig", 26)->display($context);
     // line 27
     echo "        \n</article>\n";
 }
开发者ID:bearlikelion,项目名称:im,代码行数:33,代码来源:beaf0d2997844ee6124bd363217b30e6940048173c34dab0cff4d2f90f2fc63e.php

示例9: block_form_label

 public function block_form_label($context, array $blocks = array())
 {
     $__internal_c936c4ce4a38154b717b557cf58e9a64bb5be7554a936634522d44e26fc7c465 = $this->env->getExtension("native_profiler");
     $__internal_c936c4ce4a38154b717b557cf58e9a64bb5be7554a936634522d44e26fc7c465->enter($__internal_c936c4ce4a38154b717b557cf58e9a64bb5be7554a936634522d44e26fc7c465_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "form_label"));
     // line 25
     echo "    ";
     if (twig_test_empty(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label"))) {
         // line 26
         echo "        ";
         $context["label"] = $this->env->getExtension('form')->humanize(isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"));
         // line 27
         echo "    ";
     }
     // line 28
     echo "    <label for=\"";
     echo twig_escape_filter($this->env, isset($context["id"]) ? $context["id"] : $this->getContext($context, "id"), "html", null, true);
     echo "\">\n        ";
     // line 29
     echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label")), "html", null, true);
     echo "\n        ";
     // line 30
     if (isset($context["required"]) ? $context["required"] : $this->getContext($context, "required")) {
         // line 31
         echo "            <span class=\"symfony-form-required\" title=\"This field is required\">*</span>\n        ";
     }
     // line 33
     echo "    </label>\n";
     $__internal_c936c4ce4a38154b717b557cf58e9a64bb5be7554a936634522d44e26fc7c465->leave($__internal_c936c4ce4a38154b717b557cf58e9a64bb5be7554a936634522d44e26fc7c465_prof);
 }
开发者ID:piotr401,项目名称:mini-site,代码行数:29,代码来源:e335a5b5280042f2b26d068b137bc1ffc317a11415dff59b467da8ae4043292a.php

示例10: block_form_label

 public function block_form_label($context, array $blocks = array())
 {
     $__internal_abf99680d235030955900c6bd695cb67c52595dc665ef72899bc554f2ac21971 = $this->env->getExtension("native_profiler");
     $__internal_abf99680d235030955900c6bd695cb67c52595dc665ef72899bc554f2ac21971->enter($__internal_abf99680d235030955900c6bd695cb67c52595dc665ef72899bc554f2ac21971_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "form_label"));
     // line 25
     echo "    ";
     if (twig_test_empty(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label"))) {
         // line 26
         echo "        ";
         $context["label"] = $this->env->getExtension('form')->humanize(isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"));
         // line 27
         echo "    ";
     }
     // line 28
     echo "    <label for=\"";
     echo twig_escape_filter($this->env, isset($context["id"]) ? $context["id"] : $this->getContext($context, "id"), "html", null, true);
     echo "\">\n        ";
     // line 29
     echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label")), "html", null, true);
     echo "\n        ";
     // line 30
     if (isset($context["required"]) ? $context["required"] : $this->getContext($context, "required")) {
         // line 31
         echo "            <span class=\"symfony-form-required\" title=\"This field is required\">*</span>\n        ";
     }
     // line 33
     echo "    </label>\n";
     $__internal_abf99680d235030955900c6bd695cb67c52595dc665ef72899bc554f2ac21971->leave($__internal_abf99680d235030955900c6bd695cb67c52595dc665ef72899bc554f2ac21971_prof);
 }
开发者ID:Heba-A,项目名称:shopping_cart,代码行数:29,代码来源:cbee4f64553f5d2f56f3a0bc4564a61cf7a348835d28cf6898b092b03d6be7a2.php

示例11: block_content

 public function block_content($context, array $blocks = array())
 {
     // line 5
     echo "\t<div class=\"container content\">\n\t\t";
     // line 6
     $this->env->loadTemplate("Admin/parts/menu")->display(array_merge($context, array("currentPage" => "settings")));
     // line 7
     echo "\t\t<div class=\"panel panel-primary\">\n\t\t\t<div class=\"panel-heading\">Registration</div>\n\t\t\t<div class=\"panel-body\">\t\t\n\t\t\t\t";
     // line 10
     if (!twig_test_empty(isset($context["successRegistration"]) ? $context["successRegistration"] : null)) {
         // line 11
         echo "\t\t\t\t\t<div class=\"alert alert-success\" role=\"alert\"><p>";
         echo twig_escape_filter($this->env, isset($context["successRegistration"]) ? $context["successRegistration"] : null, "html", null, true);
         echo "</p></div>\n\t\t\t\t";
     }
     // line 13
     echo "\t\t\t\t<label>Registration status</label>\n\t\t\t\t<form method=\"post\" action=\"\" class=\"form-inline\">\n\t\t\t\t\t<select name=\"registrationStatus\" class=\"form-control\">\n\t\t\t\t\t\t<option value=\"1\" ";
     // line 16
     if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "registration_status") == 1) {
         echo "selected";
     }
     echo ">On</option>\n\t\t\t\t\t\t<option value=\"0\" ";
     // line 17
     if ($this->getAttribute(isset($context["settings"]) ? $context["settings"] : null, "registration_status") == 0) {
         echo "selected";
     }
     echo ">Off</option>\n\t\t\t\t\t</select>\n\t\t\t\t\t<input type=\"hidden\" name=\"type\" value=\"registration\">\n\t\t\t\t\t<input type=\"submit\" value=\"Save\" class=\"btn btn-primary\">\n\t\t\t\t</form>\t\t\n\t\t\t</div>\n\t\t</div>\t\t\n\t</div>\n";
 }
开发者ID:robert-kampas,项目名称:games-collection-manager,代码行数:28,代码来源:a94833235861d2d29e863f775616.php

示例12: block_label

 public function block_label($context, array $blocks = array())
 {
     $__internal_185a35ed305023afb393302364aeb4f0a0b28130fb37a6761e8ba364d4a78ace = $this->env->getExtension("native_profiler");
     $__internal_185a35ed305023afb393302364aeb4f0a0b28130fb37a6761e8ba364d4a78ace->enter($__internal_185a35ed305023afb393302364aeb4f0a0b28130fb37a6761e8ba364d4a78ace_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "label"));
     // line 15
     echo "        ";
     if ((isset($context["inline"]) ? $context["inline"] : $this->getContext($context, "inline")) == "natural") {
         // line 16
         echo "            ";
         if ($this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : null, "options", array(), "any", false, true), "name", array(), "any", true, true)) {
             // line 17
             echo "                ";
             echo $this->env->getExtension('form')->renderer->searchAndRenderBlock(isset($context["field_element"]) ? $context["field_element"] : $this->getContext($context, "field_element"), 'label', twig_test_empty($_label_ = $this->getAttribute($this->getAttribute(isset($context["field_description"]) ? $context["field_description"] : $this->getContext($context, "field_description"), "options", array()), "name", array())) ? array() : array("label" => $_label_));
             echo "\n            ";
         } else {
             // line 19
             echo "                ";
             echo $this->env->getExtension('form')->renderer->searchAndRenderBlock(isset($context["field_element"]) ? $context["field_element"] : $this->getContext($context, "field_element"), 'label');
             echo "\n            ";
         }
         // line 21
         echo "            <br>\n        ";
     }
     // line 23
     echo "    ";
     $__internal_185a35ed305023afb393302364aeb4f0a0b28130fb37a6761e8ba364d4a78ace->leave($__internal_185a35ed305023afb393302364aeb4f0a0b28130fb37a6761e8ba364d4a78ace_prof);
 }
开发者ID:stuckiest,项目名称:SymfonyBlog,代码行数:27,代码来源:6a35929e6344362748d8d8346ca73611d56810dbb51d33c79f382a7785fec675.php

示例13: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     if (array_key_exists("participants", $context) && !twig_test_empty(isset($context["participants"]) ? $context["participants"] : null)) {
         // line 2
         echo "    ";
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["participants"]) ? $context["participants"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["participant"]) {
             // line 3
             echo "        <div class=\"author\">\n            <div class=\"people clearfix\">\n                <div class=\"face postet-by\">\n                    <a target=\"_blank\" href=\"";
             // line 6
             echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("view_profile", array("id" => $this->getAttribute($this->getAttribute($context["participant"], "profile", array()), "id", array()))), "html", null, true);
             echo "\">\n                        <p class=\"name\">";
             // line 7
             echo twig_escape_filter($this->env, $this->getAttribute($context["participant"], "username", array()), "html", null, true);
             echo "</p>\n                        <img width=\"82px\" src=\"";
             // line 8
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($context["participant"], "profile", array()), "avatar", array()), "html", null, true);
             echo "\">\n                    </a>\n                </div>\n            </div>\n        </div>\n    ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['participant'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
     }
 }
开发者ID:Joomlamaster,项目名称:connectionru,代码行数:26,代码来源:e6af86c1b71fc5a96f3df34d967054ea16c92ad32ba1bf3ecb46fd04a6e0.php

示例14: doDisplay

 protected function doDisplay(array $context, array $blocks = array())
 {
     // line 1
     echo "<!DOCTYPE html>\n<html>\n    <head>\n        <meta charset=\"UTF-8\">\n        <title>Shout Box</title>\n    </head>\n    <body>\n        ";
     // line 8
     if (!twig_test_empty(isset($context["error"]) ? $context["error"] : null)) {
         // line 9
         echo "            <p><b><i>";
         echo twig_escape_filter($this->env, isset($context["error"]) ? $context["error"] : null, "html", null, true);
         echo "</i></b></p>\n        ";
     }
     // line 11
     echo "     \n        <form method=\"post\">\n            Input your message: <input type=\"text\" name=\"message\">\n            <input type=\"submit\" value=\"Shout!\">            \n        </form>\n        ";
     // line 16
     $context['_parent'] = $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["messageList"]) ? $context["messageList"] : null);
     $context['_iterated'] = false;
     foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
         // line 17
         echo "            <p>* ";
         echo twig_escape_filter($this->env, $context["message"], "html", null, true);
         echo "</p>\n        ";
         $context['_iterated'] = true;
     }
     if (!$context['_iterated']) {
         // line 19
         echo "            <p><i>No shouts yet.</i></p>\n        ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 21
     echo "    </body>\n</html>";
 }
开发者ID:awesomehans,项目名称:shoutbox,代码行数:34,代码来源:6413d12c8e442efb2ac323aa8df2a5422d804b62b0af65aac376d3b55291c69c.php

示例15: block_form_label

 public function block_form_label($context, array $blocks = array())
 {
     $__internal_8a83ab026affdf256bd005a5cbaf69fe5e14365075416322e4b79bbe77fb26be = $this->env->getExtension("native_profiler");
     $__internal_8a83ab026affdf256bd005a5cbaf69fe5e14365075416322e4b79bbe77fb26be->enter($__internal_8a83ab026affdf256bd005a5cbaf69fe5e14365075416322e4b79bbe77fb26be_prof = new Twig_Profiler_Profile($this->getTemplateName(), "block", "form_label"));
     // line 25
     echo "    ";
     if (twig_test_empty(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label"))) {
         // line 26
         echo "        ";
         $context["label"] = $this->env->getExtension('form')->humanize(isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"));
         // line 27
         echo "    ";
     }
     // line 28
     echo "    <label for=\"";
     echo twig_escape_filter($this->env, isset($context["id"]) ? $context["id"] : $this->getContext($context, "id"), "html", null, true);
     echo "\">\n        ";
     // line 29
     echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans(isset($context["label"]) ? $context["label"] : $this->getContext($context, "label")), "html", null, true);
     echo "\n        ";
     // line 30
     if (isset($context["required"]) ? $context["required"] : $this->getContext($context, "required")) {
         // line 31
         echo "            <span class=\"symfony-form-required\" title=\"This field is required\">*</span>\n        ";
     }
     // line 33
     echo "    </label>\n";
     $__internal_8a83ab026affdf256bd005a5cbaf69fe5e14365075416322e4b79bbe77fb26be->leave($__internal_8a83ab026affdf256bd005a5cbaf69fe5e14365075416322e4b79bbe77fb26be_prof);
 }
开发者ID:shadman,项目名称:phpAndJavascriptTest,代码行数:29,代码来源:f754c2de3d3d2e4e47bb2f7ae228a38e423def1abf15adb9666f37c59f8b40b8.php


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