Download the PHP package jhse-labs/mezzio-twig-viewhelper without Composer
On this page you can find all versions of the php package jhse-labs/mezzio-twig-viewhelper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jhse-labs/mezzio-twig-viewhelper
More information about jhse-labs/mezzio-twig-viewhelper
Files in jhse-labs/mezzio-twig-viewhelper
Package mezzio-twig-viewhelper
Short Description Bridges laminas view helpers to the twig environment when running a mezzio application
License MIT
Informations about the package mezzio-twig-viewhelper
mezzio-twig-viewhelper
Within mezzio applications, this module bridges the classic laminas view helpers to the twig environment enabled by mezzio-twigrenderer. You can use all laminas view helpers (e.g. for rendering laminas-form components) seamlessly from you twig templates.
This is inspired by kokspflanze/zfc-twig, the module that achieved this functionality for laminas-mvc.
Installation
Install the library using composer:
composer require jhse-labs/mezzio-twig-viewhelper
Enable the module in config.php:
The laminas view helper support is added to your Twig\Environment instance automatically via registering a delegator factory.
Usage
Within your Twig templates you can now call all your laminas view helpers:
Since version 1.1.0 it is possible to call laminas view helpers with named arguments:
All versions of mezzio-twig-viewhelper with dependencies
mezzio/mezzio-laminasviewrenderer Version ^2.4
mezzio/mezzio-twigrenderer Version ^2.9
laminas/laminas-servicemanager Version ^3.3