Skip to content

schranz-templating/mezzio-twig-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schranz Template Renderer Integration for Twig

Integrate the templating Twig Adapter into the Mezzio Framework.

Part of the Schranz Templating Project.

Installation

Install this package via Composer:

composer require schranz-templating/mezzio-twig-integration

Register the ConfigProvider class in your config/config.php if not already automatically added by the framework:

// ...

$aggregator = new ConfigAggregator([
    // ...
    \Mezzio\Twig\ConfigProvider::class,
    \Schranz\Templating\Integration\Mezzio\Twig\ConfigProvider::class,
]);

Configuration

The Twig Integration has currently no configuration as Twig is supported out of the box by Mezzio and can be configured via the Mezzio Twig Renderer.

Usage with other Mezzio renderer

To use it side by side with other Mezzio renderer integrations you need configure the extension of the files:

// src/App/src/ConfigProvider.php

class ConfigProvider
{
    public function __invoke(): array
    {
        return [
            // ...
            'twig' => [
                'extension' => 'html.twig',
            ],
        ];
    }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages