PHP code example of susina / twig-extensions

1. Go to this page and download the library: Download susina/twig-extensions library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

susina / twig-extensions example snippets


 declare(strict_types=1);

$loader = new Twig\Loader\FileLoader(__DIR__ . '/templates');
$twig = new \Twig\Environment($loader);

$twig->addExtension(new \Susina\TwigExtensions\VariablesExtension());