This extension provides a ViewRender
that would allow you to use Twig view template engine
with Yii framework 2.0.
For license information check the LICENSE-file.
Documentation is at https://github.com/yiisoft/yii2-twig/blob/master/docs/guide/README.md.
The preferred way to install this extension is through composer:
php composer.phar require --prefer-dist yiisoft/yii2-twig
To use this extension, configure it as described in documentation.
t()
function (samdark)yii\twig\Profile
. Extension for render profiling (amarox)Twig\Node::getLine()
(dmirogin)ViewRendererStaticClassProxy:__isset()
to be able to access static variable in the template (mrlinqu)path()
and url()
syntax to be similar to Yii's Url::to()
(quantum13)@app/views
, @app/modules
, @app/widgets
as Twig_Loader_Filesystem
loader paths, same for theme pathMap
paths (andrew-kamenchuk)register_asset_bundle()
to return AssetBundle
instance when second argument is true
(gta4kv){{ register_asset_bundle('yii/web/JqueryAsset') }}
(quantum13)Twig_SimpleFunction
and Twig_SimpleFilter
when defining functions and filters (quantum13)path
and url
weren't resolving aliases (samdark, lynicidn)lexerOptions
throwing exception (dapatrese)form_begin
, form_end
to twig extension (samdark)FileLoader
and used \Twig_Loader_Filesystem
instead.set()
that allows setting object properties.form_begin
, form_end
(samdark)use()
and ViewRenderer::uses
that are importing classes and namespaces (grachov, samdark)*_begin
, *_end
, *_widget
, widget_end
(grachov, samdark)TwigSimpleFileLoader
into FileLoader
(samdark)
Comments