1

Yii2-Image Gallery

The Yii2 extension uses jQuery PrettyPhoto and OwlCarousel js and makes image galary from php array of structure defined.

Yii - Image Galary

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require "2amigos/yii2-google-maps-library" "*"

or add

"slavkovrn/yii2-imagegalary": "*"

to the require section of your composer.json file.

 

Usage

Set link to extension in your view:

<?php
    use slavkovrn\imagegalary\ImageGalaryWidget;
?>

<?= ImageGalaryWidget::widget([
        'id' =>'imagegalary',       // id of plugin should be unique at page
        'class' =>'imagegalary',    // class of div to define style
        'css' => 'border:white;',   // css commands of class (for example - border-radius:5px;)
        'image_width' => 320,       // height of image visible in pixels
        'image_height' => 240,      // width of image visible in pixels
        'thumb_width' => 80,        // height of thumb images in pixels
        'thumb_height' => 50,       // width of thumb images in pixels
        'items' => 3,               // number of thumb items
        'images' => [               // images of galary
            [
                    'src' => 'https://static.pexels.com/photos/20974/pexels-photo.jpg',
                    'title' => 'Image visible in widget',
            ],
            [
                    'src' => 'http://images.all-free-download.com/images/graphiclarge/beautiful_nature_landscape_05_hd_picture_166223.jpg',
                    'title' => 'image 2',
            ],
            [
                    'src' => 'http://images.all-free-download.com/images/graphiclarge/beautiful_nature_landscape_03_hd_picture_166205.jpg',
                    'title' => 'image 3',
            ],
            [
                    'src' => 'https://static.pexels.com/photos/207962/pexels-photo-207962.jpeg',
                    'title' => 'image 4',
            ],
        ]
    ]) ?>

 


 

Prakash S

Prakash S

I would like to introduce myself as a Software professional opting for the career in software industry. I'm Prakash S, a MCA graduate and trained as industry level practice for Software technology. Basically I am a PHP Developer but now days exploring more in HTML5, CSS, AngularJS and jQuery libraries.