PHP code example of djboris88 / twig-commented-include
1. Go to this page and download the library: Download djboris88/twig-commented-include 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/ */
djboris88 / twig-commented-include example snippets
/** @var $twig Twig_Environment */
$twig->addExtension(new Djboris88\Twig\Extension\CommentedIncludeExtension());
// app/AppKernel.php
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
$bundles[] = new Djboris88\Twig\Extension\CommentedIncludeTwigExtensionBundle();
}
// config/bundles.php
//...
return [
//...
Djboris88\Twig\Extension\CommentedIncludeTwigExtensionBundle::class => ['dev' => true]
];