PHP code example of sgroup / site-module

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

    

sgroup / site-module example snippets




return [
    'staging' => [
        'isOffline' => true,
    ],
];

use sgroup\sitemodule\base\Module;

class SiteMigration extends Module
{
twig
{% set attributes = getImgAttr(asset, 'small', false, false) | merge({
    class: 'img-cover',
}) %}

<img {{ attr(attributes) }} />