PHPackages                             inteve/latte - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. inteve/latte

ActiveLibrary

inteve/latte
============

Extensions for Latte templates

v1.1.0(10mo ago)09[1 PRs](https://github.com/inteve/latte/pulls)BSD-3-ClausePHPPHP 8.0 - 8.2CI passing

Since Dec 8Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/inteve/latte)[ Packagist](https://packagist.org/packages/inteve/latte)[ Fund](https://www.janpecha.cz/donate/)[ RSS](/packages/inteve-latte/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

Inteve\\Latte
=============

[](#intevelatte)

[![Build Status](https://github.com/inteve/latte/workflows/Build/badge.svg)](https://github.com/inteve/latte/actions)[![Downloads this Month](https://camo.githubusercontent.com/4493f0d03aeab4797854e1d0b1a77428d1cfae12eadd3a101c095a6c4e65ab71/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f696e746576652f6c617474652e737667)](https://packagist.org/packages/inteve/latte)[![Latest Stable Version](https://camo.githubusercontent.com/9a83737a5da51c6b17a8f0d4e6d142eecf683c0ee9ceb5626161f54de5d7bcd4/68747470733a2f2f706f7365722e707567782e6f72672f696e746576652f6c617474652f762f737461626c65)](https://github.com/inteve/latte/releases)[![License](https://camo.githubusercontent.com/fa7d5fcf2c84b580327af52da95dd751703af65f079dc3c5a0081beac0789718/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4e65772532304253442d626c75652e737667)](https://github.com/inteve/latte/blob/master/license.md)

Extensions for Latte templates

[![Donate](https://camo.githubusercontent.com/101b981194f1dafbf9c42e19c3034fe2d724e75be972cef0f4477074997834db/68747470733a2f2f6275796d65636f666665652e696e746d2e6f72672f696d672f646f6e6174652d62616e6e65722e76312e737667)](https://www.janpecha.cz/donate/)

Installation
------------

[](#installation)

[Download a latest package](https://github.com/inteve/latte/releases) or use [Composer](http://getcomposer.org/):

```
composer require inteve/latte

```

Inteve\\Latte requires PHP 8.0 or later and Latte 2.

Usage
-----

[](#usage)

### Installation of extensions

[](#installation-of-extensions)

```
\Inteve\Latte\ExtensionInstaller::install($latte, [
	new FooExtension,
	new BarExtension,
]);
```

or via Nette DI extension:

```
extensions:
	inteve.latte: Inteve\Latte\DIExtension

services:
	- FooExtension
	- BarExtension
```

### IconExtension

[](#iconextension)

Creates new Latte tag `{icon foo}`. Saves icon code directly to compiled template. Requires implementation PHIG's `HtmlIcons` interface.

```
\Inteve\Latte\ExtensionInstaller::install($latte, [
	new \Inteve\Latte\IconExtension($phigIcons),
]);
```

```
{icon myIcon}
```

### TypographyExtension

[](#typographyextension)

Creates new Latte filter `|typography`.

```
\Inteve\Latte\ExtensionInstaller::install($latte, [
	new \Inteve\Latte\TypographyExtension,
]);
```

```
{='My a text'|typography} {* prints 'My a&nbsp;text' *}
```

### Custom extension

[](#custom-extension)

Just extends `Inteve\Latte\Extension`:

```
class MyExtension extends \Inteve\Latte\Extension
{
	/**
	 * @return array
	 */
	public function getTags(): array
	{
		return [
			function (\Latte\Compiler $compiler) {
				$me = new Latte\Macros\MacroSet($compiler);
				$me->addMacro('myTag', ['MyLatteMacros', 'macroMyTag']);
			},
		];
	}

	/**
	 * @return array
	 */
	public function getFilters(): array
	{
		return [
			'myFilter' => function ($value) {
				return $value,
			},
		];
	}

	/**
	 * @return array
	 */
	public function getProviders(): array
	{
		return [
			'myProvider' => 'foo bar',
		];
	}
}
```

---

License: [New BSD License](license.md)
Author: Jan Pecha,

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance54

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~572 days

Total

2

Last Release

319d ago

PHP version history (2 changes)v1.0.0PHP 7.4 - 8.2

v1.1.0PHP 8.0 - 8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c980b1511b4a0350442dc23d89c99d4d9a2411b7e765d52c133ccacf616968b?d=identicon)[janpecha](/maintainers/janpecha)

---

Top Contributors

[![janpecha](https://avatars.githubusercontent.com/u/637719?v=4)](https://github.com/janpecha "janpecha (9 commits)")

### Embed Badge

![Health badge](/badges/inteve-latte/health.svg)

```
[![Health](https://phpackages.com/badges/inteve-latte/health.svg)](https://phpackages.com/packages/inteve-latte)
```

###  Alternatives

[nette/nette

👪 Nette Framework - innovative framework for fast and easy development of secured web applications in PHP (metapackage)

1.6k2.8M335](/packages/nette-nette)[contributte/translation

Symfony/Translation integration for Nette Framework.

771.8M37](/packages/contributte-translation)[kdyby/translation

Integration of Symfony/Translation into Nette Framework

921.2M24](/packages/kdyby-translation)[nette/web-project

Nette: Standard Web Project

10991.8k](/packages/nette-web-project)[contributte/image-storage

Image storage for Nette framework

28749.3k1](/packages/contributte-image-storage)[brandembassy/slim-nette-extension

19190.2k](/packages/brandembassy-slim-nette-extension)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
