Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zhukmax/twigpad

Lib for add symbols to start or end of string in Twig templates.
https://github.com/zhukmax/twigpad

Last synced: 10 days ago
JSON representation

Lib for add symbols to start or end of string in Twig templates.

Awesome Lists containing this project

README

        

# TwigPad
[![Software License][ico-license]](license.md)
[![Total Downloads][ico-downloads]][link-downloads]

Lib for add symbols to start or end of string in Twig templates.

## Install
```console
composer require zhukmax/twigpad
```

## Usage
Basic example:
```php
'Hello {{ rightpad(name, 9, "#") }}',
));

$twig = new Twig_Environment($loader);
$twig->addExtension(new Zhukmax\TwigPad\TwigPad());

echo $twig->render('index', array('name' => 'Max'));
// => Hello Max######
```

[ico-license]: https://img.shields.io/badge/license-Apache%202-brightgreen.svg
[ico-downloads]: https://img.shields.io/packagist/dt/zhukmax/twigpad.svg
[link-downloads]: https://packagist.org/packages/zhukmax/twigpad