panix/wgt-fancybox

Fancybox widget for Yii2

Installs: 4 056

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:pixelion-widget

1.3.2 2021-07-31 20:18 UTC

This package is auto-updated.

Last update: 2024-10-29 05:10:35 UTC


README

Widget for Yii2

Latest Stable Version Total Downloads Monthly Downloads Daily Downloads Latest Unstable Version License

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");
        }')
    ]
]);

?>

Links