<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Coding Standards When writing Twig templates, we recommend you to follow these official codingstandards: - Put one (and only one) space after the start of a delimiter (`{{`, `{%`,and `{#`) and before the end of a delimiter (`}}`, `%}`, and `#}`): <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2 3</pre></div></td><td class="code"><div class="highlight"><pre>{{ foo }} {# comment #} {% if foo %}{% endif %} </pre></div></td></tr></table> When using the whitespace control character, do not put any spaces betweenit and the delimiter: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2 3</pre></div></td><td class="code"><div class="highlight"><pre>{{- foo -}} {#- comment -#} {%- if foo -%}{%- endif -%} </pre></div></td></tr></table> - Put one (and only one) space before and after the following operators:comparison operators (`==`, `!=`, `<`, `>`, `>=`, `<=`), mathoperators (`+`, `-`, `/`, `*`, `%`, `//`, `**`), logicoperators (`not`, `and`, `or`), `~`, `is`, `in`, and the ternaryoperator (`?:`): ~~~ {{ 1 + 2 }} {{ foo ~ bar }} {{ true ? true : false }} ~~~ - Put one (and only one) space after the `:` sign in hashes and `,` inarrays and hashes: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2</pre></div></td><td class="code"><div class="highlight"><pre>{{ [1, 2, 3] }} {{ {'foo': 'bar'} }} </pre></div></td></tr></table> - Do not put any spaces after an opening parenthesis and before a closingparenthesis in expressions: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre>{{ 1 + (2 * 3) }} </pre></div></td></tr></table> - Do not put any spaces before and after string delimiters: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2</pre></div></td><td class="code"><div class="highlight"><pre>{{ 'foo' }} {{ "foo" }} </pre></div></td></tr></table> - Do not put any spaces before and after the following operators: `|`,`.`, `..`, `[]`: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2 3 4</pre></div></td><td class="code"><div class="highlight"><pre>{{ foo|upper|lower }} {{ user.name }} {{ user[name] }} {% for i in 1..12 %}{% endfor %} </pre></div></td></tr></table> - Do not put any spaces before and after the parenthesis used for filter andfunction calls: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2</pre></div></td><td class="code"><div class="highlight"><pre>{{ foo|default('foo') }} {{ range(1..10) }} </pre></div></td></tr></table> - Do not put any spaces before and after the opening and the closing of arraysand hashes: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2</pre></div></td><td class="code"><div class="highlight"><pre>{{ [1, 2, 3] }} {{ {'foo': 'bar'} }} </pre></div></td></tr></table> - Use lower cased and underscored variable names: <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2</pre></div></td><td class="code"><div class="highlight"><pre>{% set foo = 'foo' %} {% set foo_bar = 'foo' %} </pre></div></td></tr></table> - Indent your code inside tags (use the same indentation as the one used forthe target language of the rendered template): <table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1 2 3 4 5</pre></div></td><td class="code"><div class="highlight"><pre>{% block foo %} {% if true %} true {% endif %} {% endblock %} </pre></div></td></tr></table>
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看