lukasbableck/contao-twig-utils-bundle
最新稳定版本:1.5.0
Composer 安装命令:
composer require lukasbableck/contao-twig-utils-bundle
包简介
This bundle provides some useful additional twig functions and filters for Contao Open Source CMS.
README 文档
README
This bundle provides some useful additional twig functions and filters for Contao Open Source CMS.
Filters
json_decode(?bool $assoc = false)
Decodes a JSON string into a PHP array or object.
to_array
Converts a given value to an array. If the value is already an array, its children are converted to arrays as well.
Functions
contao_config()
Returns the Contao Config object.
contao_form(id|alias)
Generates a form and returns the html output.
file(id|uuid|path)
Returns the FilesModel for the given id, uuid or path.
page(id|alias, ?bool $published = false)
Returns the PageModel for the given id or alias. If $published is set to true, it will only return published pages.
reading_time(text, ?int $wpm = 250)
Estimates the reading time for the given text based on the provided words per minute (default is 250 wpm). The function returns the reading time in seconds.
统计信息
- 总下载量: 148
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2025-03-05