vivekmarakana/yii2-image-gallery-selector

multiple image selector from gallery for yii2

dev-master 2020-09-10 08:49 UTC

This package is auto-updated.

Last update: 2024-04-10 17:02:40 UTC


README

Total Downloads Monthly Downloads License

multiple image selector from gallery for yii2

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist vivekmarakana/yii2-image-gallery-selector "dev-master"

or add

"vivekmarakana/vivekmarakana/yii2-image-gallery-selector": "dev-master"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

$images = [];
foreach (Image::find()->each(100) as $row) {
    $images[] = [
        'name' => $row->image_name, //optional
        'url' => $row->url,
        'id' => 'image-' . $row->id,
    ];
}

echo \vivekmarakana\widgets\GallerySelector::widget(['images' => $images]);