PHP code example of xj / yii2-galleria-widget

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

    

xj / yii2-galleria-widget example snippets


\xj\galleria\themes\DefaultAssets::register($this);
\xj\galleria\themes\TwelveAssets::register($this);

\xj\galleria\GalleriaAssets::register($this);

\xj\galleria\themes\DefaultAssets::register($this);
xj\galleria\Galleria::widget([
    'selector' => '#galleria',
]);

\xj\galleria\themes\DefaultAssets::register($this);
xj\galleria\Galleria::widget([
    'selector' => '#gallery',
    'jsOptions' => [
        'dataSource' => '#source',
        'keepSource' => false,
    ]
]);

\xj\galleria\themes\DefaultAssets::register($this);
xj\galleria\Galleria::widget([
    'selector' => '#gallery',
    'jsOptions' => [
        'dataSource' => [
            ['image' => Yii::getAlias('@web/images/hoverzoom/1.jpg')],
            ['image' => Yii::getAlias('@web/images/hoverzoom/3.jpg')],
            ['image' => Yii::getAlias('@web/images/nivoslider/1.jpg')],
        ],
        'keepSource' => false,
    ]
]);