Statistics
6581
1
0
1.4y
Badges
Tags
latte
Dependencies

Latte-Formatter

Simple string formatter for Latte.


Build Status Downloads total Latest stable HHVM Status

Discussion / Help

Join the chat

Install

$ composer require minetro/latte-formatter:~1.0.0

Usage

Register in config

Register in your config file (e.q. config.neon).

services:
    formatter.money: 
        class: Minetro\Formatter\NumberFormatter('Kc')
        
    formatter.weight: 
        class: Minetro\Formatter\NumberFormatter('kg', '~')
        setup:
            - setThousand(NULL)
            - setDecimal(0)
    
    nette.latteFactory:
        setup:
            - addFilter(money, [@formatter.number,format])
            # or
            - addFilter(money, @formatter.number::format)

No release at this moment. Try to create first one.

Is this addon outdated? Did you find an issue? Please report it.

Componette Componette admin@componette.com