panix / wgt-fancybox
Fancybox widget for Yii2
Package info
github.com/andrtechno/wgt-fancybox
Type:pixelion-widget
pkg:composer/panix/wgt-fancybox
1.3.2
2021-07-31 20:18 UTC
This package is auto-updated.
Last update: 2026-03-01 00:23:49 UTC
README
Widget for Yii2
Installation
The preferred way to install this extension is through composer.
Either run
php composer require --prefer-dist panix/wgt-fancybox
or add
"panix/wgt-fancybox": "^1.3.0"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
<?php echo \panix\ext\fancybox\Fancybox::widget(['target' => 'a.fancybox-image']); // or use options echo \panix\ext\fancybox\Fancybox::widget([ 'target' => 'a.fancybox-image', 'options' => [ //.. 'onInit'=> new \yii\web\JsExpression('function(){ console.log("Fancybox onInit"); }') ] ]); ?>