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: 4 months ago
JSON representation
Lib for add symbols to start or end of string in Twig templates.
- Host: GitHub
- URL: https://github.com/zhukmax/twigpad
- Owner: ZhukMax
- License: apache-2.0
- Created: 2018-08-07T11:32:06.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-21T11:31:48.000Z (over 5 years ago)
- Last Synced: 2025-01-07T18:20:46.718Z (6 months ago)
- Language: PHP
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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