ksadam/latte-nonbreaking-space

Adding non-breaking space to string where it is necessary

v1.0.2 2019-05-28 14:14 UTC

This package is auto-updated.

Last update: 2024-05-29 01:16:49 UTC


README

Inject filter into presenter:

use Ksadam\Latte\NonBreakingSpace;
...
    /** @var NonBreakingSpace @inject */
    public $nonBreakingSpace;
...
    protected function beforeRender()
    {
        $this->template->addFilter('nonBreakingSpace', $this->nonBreakingSpace);
    }
...

Use filter in latte:

{$variable|nonBreakingSpace}