PHP code example of wapmorgan / morphos-twig

1. Go to this page and download the library: Download wapmorgan/morphos-twig 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/ */

    

wapmorgan / morphos-twig example snippets


$container
    ->register('morphos.twig_extension', morphos\MorphosTwigExtension::class)
    ->setPublic(false)
    ->addTag('twig.extension');

$twig = new Twig_Environment($loader);
$twig->addExtension(new morphos\MorphosTwigExtension());