当使用 Doctrine 命令在 Symfony2 应用程序中生成 CRUD 时,生成的 Twig 模板内容在 Twig 块中以这种方式定义:
When generating a CRUD in a Symfony2 application with Doctrine commands, generated Twig template content is defined within a Twig block this way:
{% block body -%}
{% endblock %}
-%}
中的连字符是什么意思?没有连字符就可以正常工作,我在 Twig 文档中找不到类似的东西.
What does the hyphen in -%}
mean? It works fine without the hyphen and I could not find anything similar in the Twig documentation.
-%}
表示修剪空白.
请参阅文档的 空白控制部分.
上一篇:当用户卸载Android应用程序的通知应用程序、通知、用户、Android
下一篇:MediaPlayer的IsPlaying模块()总是返回false模块、MediaPlayer、IsPlaying、false