parisek/twig-common
最新稳定版本:v1.1.0
Composer 安装命令:
composer require parisek/twig-common
包简介
A Twig extension with common functions and filters
关键字:
README 文档
README
Installation
Twig Common Extension can be easily installed using composer
composer require parisek/twig-common
Usage
$twig = new Twig_Environment($loader); $twig->addExtension(new Parisek\Twig\CommonExtension());
Filters
Will load YAML to variable
{% set sidebar = source('sidebar.yml')|yaml_parse %}
Will return content without translation (useful for debug without translation extension)
{{ "Hello"|t }}
Functions
Will generate unique ID on the page
{{ uniqueId() }}
Tokens
Will return content without translation (useful for debug without translation extension)
{% trans with {'context': 'domain name'} %}{{ variable }}{% endtrans %}
统计信息
- 总下载量: 577
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2021-08-14