Download the PHP package md-php/bridge-twig-html-truncation without Composer
On this page you can find all versions of the php package md-php/bridge-twig-html-truncation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download md-php/bridge-twig-html-truncation
More information about md-php/bridge-twig-html-truncation
Files in md-php/bridge-twig-html-truncation
Package bridge-twig-html-truncation
Short Description Provides bridge between Twig and HTML truncation library
License MIT
Homepage https://development.md.land/php/md-bridge-twig-html-truncation
Informations about the package bridge-twig-html-truncation
md-php/bridge-twig-html-truncation
md-php/bridge-twig-html-truncation is a PHP component that brings md-php/html-truncation functionality into Twig component and provides additional Twig filter and function to truncate HTML code.
Architecture overview
Install
Usage
Extension brings filter and function with the truncate_html_with_text_length name and next signature:
Basic filter usage example:
Filter usage with custom ending example:
Read documentation for more examples.
Documentation
Read documentation with examples: https://development.md.land/php/md-bridge-twig-html-truncation/
Integration with Symfony
Define services:
and it's ready to use.
Development
Initial setup:
Run checks (Psalm + PHPStan + PHPUnit):
Validate files:
Changelog
License (MIT)
All versions of bridge-twig-html-truncation with dependencies
twig/twig Version ^2.12.5 || ^3.0
php Version ^7.1 || ^8.0
symfony/polyfill-php83 Version ^1.30