bearlikelion / twig-jsontools
A Twig extension to encode and decode json.
Installs: 3 542
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 4
Open Issues: 0
Requires
- php: >=5.3.0
- twig/twig: *
This package is auto-updated.
Last update: 2024-11-23 22:06:30 UTC
README
A simple twig extension to provide json encode and decode filters and functions for Twig.
Requirements:
Installation
"require": {
"bearlikelion/twig-jsontools": "dev-master",
}
Example
$twig = new \Twig\Environment(new \Twig\Loader\FilesystemLoader('Views')); $twig->addExtension(new Bearlikelion\TwigJsonTools\Extension());
<html> <body> {{ json_decode(json.object) }} </body> </html>