PHP code example of lewiscom / twigextensions

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

    

lewiscom / twigextensions example snippets


return [
    'modules' => [
        'twigextensions' => [
            'class' => lewiscom\twigextensions\TwigExtensionsModule::class
        ],
    ],
    'bootstrap' => [
        'twigextensions'
    ],
];



return [
    // All environments
    '*' => [
        'disabled' => [
            lewiscom\twigextensions\extensions\PhoneNumberExtension::class,
        ],
    ],
    'production' => [
        'disabled' => [
            lewiscom\twigextensions\extensions\DumpDieExtension::class,
        ],
    ],
    'dev' => [
        'disabled' => [
            lewiscom\twigextensions\extensions\RegExpExtension::class,
        ],
    ],
];



return [
    '*' => [
        'globals' => [
            'conf' => Craft::$app->config->getGeneral()
        ],
    ],
];