PHP code example of ramzyvirani / yii2-lightbox

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

    

ramzyvirani / yii2-lightbox example snippets


echo Lightbox::widget([
    'files' => [
        [
            'thumb' => 'url/to/thumb.ext',
            'original' => 'url/to/original.ext',
            'title' => 'optional title',
        ],
    ]
]);

echo Lightbox::widget([
    'files' => [
        [
            'thumb' => [
                'src'=>'url/to/thumb.ext',
                'htmlOptions' => ['class'=>'col-md-12', 'alt'=>'Alternate Text'] // These options will be applied to Image tag.
            ],
            'original' => [
                'src' => 'url/to/original.ext',
            ]
            'title' => 'optional title',
        ],
    ]
]);

php composer.phar