Skip to content

schranz-templating/mezzio-latte-integration

Repository files navigation

Schranz Template Renderer Integration for Latte

Integrate the templating Latte Adapter into the Mezzio Framework.

Part of the Schranz Templating Project.

Installation

Install this package via Composer:

composer require schranz-templating/mezzio-latte-integration

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

// ...

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

Configuration

The following configuration is available:

// src/App/src/ConfigProvider.php

class ConfigProvider
{
    public function __invoke(): array
    {
        return [
            // ...
            'latte' => [
                'path' => 'src/App/templates',
                'cache_dir' => 'data/cache/latte',
                'extensions' => [
                    \App\Latte\MyExtension::class,
                    // or
                    'my_extension',
                ],
            ],
        ];
    }
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages