原文:Twig in Drupal 8
Twig 是PHP的一个模板引擎,是Symfony2框架的一部分。
在Drupal 8中,Twig代替PHP模板而成为默认的模板引擎。这种变化的结果之一是,所有 theme_* 函数和基于 PHP 模板的 *.tpl.php 文件都由 *.html.twig 模板文件所代替。
以下是英文原文,可对照阅读:
Last updated October 19, 2014. Created on October 3, 2014. Edited by batigolix, jOksanen, LoMo. You can edit this page, too.
Twig is a template engine for PHP and it is part of the Symfony2 framework.
In Drupal 8 Twig replaces PHPTemplate as the default templating engine. One of the results of this change is that all of the theme_*
functions and PHPTemplate based *.tpl.php
files have been replaced in by *.html.twig
template files.
本篇已校对,需要注意几点