PHP code example of sachleen / twig-truncatep

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

    

sachleen / twig-truncatep example snippets


$twig = new Twig_Environment($loader);
$twig->addExtension(new \Sachleen\Twig\TwigTruncatePExtension());