Registry / utility / twig-html-extra

twig-html-extra

JSON →
library3.24.0phppackagistunverified

A Twig extension providing additional HTML-related filters and functions.

composer require twig/html-extra
INSTALL
IMPORT
SIG · TWIG-HTML-EXTRA
T
twig-html-extra
utilityphpv3.24.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HtmlExtension
use Twig\Extra\Html\HtmlExtension;

Adds the HTML extension to Twig and uses the html_compress filter.

use Twig\Extra\Html\HtmlExtension; $twig = new \Twig\Environment(new \Twig\Loader\ArrayLoader()); $twig->addExtension(new HtmlExtension()); $output = $twig->render('{{ "<p>test</p>"|html_compress }}');
Debug
Known issues

No known issues recorded.

Upgrade
Version history
3.24.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
14
Resources
twig-html-extra — pip install twig-html-extra · libregistry