vivekmarakana / yii2-image-gallery-selector
multiple image selector from gallery for yii2
Installs: 1 042
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 2
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: >=2.0.0
This package is auto-updated.
Last update: 2024-11-10 18:31:55 UTC
README
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]);