Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/zhukmax/twigpad
- Owner: ZhukMax
- License: apache-2.0
- Created: 2018-08-07T11:32:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-21T11:31:48.000Z (over 4 years ago)
- Last Synced: 2024-11-07T17:58:17.600Z (13 days 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