承接 dms/twig-extension-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dms/twig-extension-bundle

最新稳定版本:v2.1.0

Composer 安装命令:

composer require dms/twig-extension-bundle

包简介

DMS Twig Extension Bundle, leverages Fabien Potencier's extra twig extensions for your website.

README 文档

README

This bundle leverages a collection of Fabien Potencier's Twig Extensions for use in your application.

Extensions

Fabien's "Twig Extensions"

Available at Fabien's repository these extensions are considered useful but do not belong in the Core of Twig, so they have been moved to this separate repository, they are:

  • Text: truncate and wordwrap filter
  • Debug: retrieves the token parser
  • Intl: localized date filter
  • i18n: trans filter and block (this extension conflicts with standard Symfony translator, so it is off by default, see Usage below.)

Further documentation is available in the repository.

DMS Extensions

These are custom extensions which I find myself writing over and over for new projects.

  • Textual Date: converts timestamp into dates like: 2 days ago (docs)

Installing

Simply run this

composer require dms/twig-extension-bundle 

Load the bundle in your AppKernel

<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new DMS\Bundle\TwigExtensionBundle\DMSTwigExtensionBundle(), ); } 

Usage

To control which extensions should be enabled, you can optionally add configuration settings in app/config.yml:

# Default settings dms_twig_extension: fabpot: array: true date: true i18n: false intl: true text: true dms: textual_date: true pad_string: true 

Extensions set to false will not be loaded. Please refer to the extensions documentation for detailed usage on each one.

统计信息

  • 总下载量: 294.86k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 20
  • 点击次数: 5
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 2
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固