PHP code example of appt / twig

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

    

appt / twig example snippets


return array(
    'modules' => array(
        'ApptTwig',
    )
);


return array(
    'appt' => array(
        'twig' => array(
            'default_template_suffix' => 'twg', // you can change file extension used by TemplatePathStack
            'template_path_stack' => array(
                'dir/1/',
                'dir/2/'
            ),
            'template_map' => array(
                'layout/layout' => 'dir/layout.twig',
                'error' => __DIR__ . 'dir/error.twig',
            ),
        ),
    ),
);

return array(
 'appt' => array(
        'twig' => array(
            'engine_options' => array(
                'debug' => true, // turn on debug mode
            )
        ),
    ),
);

return array(
    'appt' => array(
        'twig' => array(
            'extension_manager' => array(
                'factories' => array (
                    'ZendViewHelpers' => 'ApptTwig\Service\Extension\ZendViewHelpersFactory'
                )
            ),
        )
    )
);