Skip to content

Repository files navigation

Shapecode - Twig String Loader Bundle

paypal

PHP VersionLatest Stable VersionLatest Unstable VersionTotal DownloadsMonthly DownloadsDaily DownloadsLicense

Install instructions

First you need to add shapecode/twig-string-loader-bundle to composer.json:

Do it by execute composer require shapecode/twig-string-loader-bundle or do it manually

{
"require": {
"shapecode/twig-string-loader-bundle": "^2.0"
}
}

You also have to add ShapecodeTwigStringLoaderBundle to your AppKernel.php ...

<?php// app/AppKernel.php//...class AppKernel extends Kernel
{
//...publicfunctionregisterBundles()
{
$bundles = array(
...
newShapecode\Bundle\TwigStringLoaderBundle\ShapecodeTwigStringLoaderBundle(),
);
//...return$bundles;
}
//...
}

... or bundles.php when you don't use Symfony Flex.

<?php// bundles.php//...return [
// ..... Shapecode\Bundle\TwigStringLoaderBundle\ShapecodeTwigStringLoaderBundle::class => ['all' => true],
];

Usage

Now you can compile strings with twig:

<?php$this->get('twig')->render('Hello {{ world }}', array(
'world' => 'World'
));

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages