Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.06 KB

README.md

File metadata and controls

45 lines (33 loc) · 1.06 KB

Schranz Template Renderer Integration for Twig

Integrate the templating Twig Adapter into the Laminas Framework.

Part of the Schranz Templating Project.

Installation

Install this package via Composer:

composer require schranz-templating/laminas-twig-integration

Add the module to the config/modules.config.php.php:

return [
    // ...
    'Schranz\Templating\Integration\Laminas\Twig',
];

Configuration

The example and default configuration can be found in config/module.config.php.

Extensions

To extend Twig functionality you can create a new service extending from Twig\Extension the service need to be registered and its service name configured the module.config.php:

return [
    // ...
    'schranz_templating_twig' => [
        'extensions' => [
            \App\Twig\MyExtension::class,
            // or
            'my_extension',
        ],
    ],
];