PHP code example of andrew72ru / yii2-featherlight

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

    

andrew72ru / yii2-featherlight example snippets


<?= \andrew72ru\featherlight\FeatherLight::widget([
    'src' => Url::to(['small-image']), // Small image
    'url' => Url::to(['large-image']), // Large image
    'imageOptions' => ['class' => 'img-thumbnail'] // Image html options
]); 


$items = [
    [
        'src' => Url::to(['small-image-0']), // Small image
        'url' => Url::to(['large-image-0']), // Large image
    ],
    [
        'src' => Url::to(['small-image-1']), // Small image
        'url' => Url::to(['large-image-1']), // Large image
    ],
    [
        'src' => Url::to(['small-image-2']), // Small image
        'url' => Url::to(['large-image-2']), // Large image
    ],
    [
        'src' => Url::to(['small-image-3']), // Small image
        'url' => Url::to(['large-image-3']), // Large image
    ],
];

echo FeatherlightGallery::widget([
    'items' => $items, 
    'previewOptions' => ['class' => 'img-thumbnail'], // Small image html options
    'sectionOptions' => ['style' => 'display: block'] // Section html options
]);

php composer.phar