PHP code example of hypejunction / elgg-twig

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

    

hypejunction / elgg-twig example snippets


$user = elgg_get_logged_in_user_entity();

echo elgg_twig('test', ['name' => $user->getDispayName()];

elgg_set_config('environment', 'development');