Skip to content

ZhukMax/TwigPad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TwigPad

Software License Total Downloads

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

Install

composer require zhukmax/twigpad

Usage

Basic example:

<?php

require_once 'vendor/autoload.php';

$loader = new Twig_Loader_Array(array(
    'index' => 'Hello {{ rightpad(name, 9, "#") }}',
));

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

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages