PHPackages                             dms/twig-extension-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. dms/twig-extension-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

dms/twig-extension-bundle
=========================

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

v2.1.0(8y ago)19296.3k↑180%7[2 PRs](https://github.com/rdohms/dms-twig-extension-bundle/pulls)MITPHPPHP ^5.6|^7

Since Nov 29Pushed 5y ago2 watchersCompare

[ Source](https://github.com/rdohms/dms-twig-extension-bundle)[ Packagist](https://packagist.org/packages/dms/twig-extension-bundle)[ Docs](https://github.com/rdohms/DMSTwigExtensionBundle)[ RSS](/packages/dms-twig-extension-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (14)Used By (0)

DMSTwigExtensionBundle
======================

[](#dmstwigextensionbundle)

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

Extensions
----------

[](#extensions)

### Fabien's "Twig Extensions"

[](#fabiens-twig-extensions)

Available at [Fabien's repository](https://github.com/fabpot/Twig-extensions) 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](https://github.com/fabpot/Twig-extensions/blob/master/doc/index.rst) is available in the repository.

### DMS Extensions

[](#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](/Resources/doc/textual_date.md))

Installing
----------

[](#installing)

Simply run this

```
composer require dms/twig-extension-bundle

```

Load the bundle in your AppKernel

```
