panix/wgt-fancybox

Fancybox widget for Yii2

Installs: 156

Dependents: 3

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:pixelion-widget

dev-master 2021-02-01 10:57 UTC

This package is auto-updated.

Last update: 2021-05-29 11:42:23 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": "*"

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