2017 © Pedro Peláez
 

library yii2-blueimp-gallery

BlueImp Gallery Widget

image

iamwebdesigner/yii2-blueimp-gallery

BlueImp Gallery Widget

  • Saturday, October 17, 2015
  • by iamwebdesigner
  • Repository
  • 1 Watchers
  • 1 Stars
  • 52 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Yii 2 Blueimp Gallery Widget

Yii 2 widget for working with js blueimp gallery plugin., (*1)

About

The widget is split into two parts:
- Widget renderer
- Items list generator, (*2)

It is possible to use list generator without rendering component, but make sure you register necessary styles and scripts by calling registerAssets method of items component and pass View class into it., (*3)

Installation

Composer command to install this package, (*4)

composer require iamwebdesigner/yii2-blueimp-gallery

Usage

Using items list generator

<?php
use iamwebdesigner\blueimp\helpers\YouTube;
$items = new YouTube([
    'items' => [ // enter youtube video ids as elements of the array
        'ZXsQAXx_ao0',
        '5-sfG8BV8wU',
        'DdGetnDJKCg',
    ]
])->items;

Using whole widget

<?php
use iamwebdesigner\blueimp\BlueImpGallery;
use iamwebdesigner\blueimp\helpers\Image;
echo BlueImpGallery::widget([
    'itemsComponent' => new Image([
        'items' => [ // array of images to use, at key 0 comes image url
            ['/images/54668', 'title' => 'JavaScript'],
            ['/images/r46457', 'title' => 'Ruby'],
            ['/images/t4y5b', 'title' => 'PHP'],
            ['/images/f5h5eg', 'title' => 'C#'],
        ]
    ]),
    'clientOptions' => [ // js plugin options
        'closeOnEscape' => false
    ],
    'showIndicators' => false,
]);
?>

The Versions

17/10 2015

dev-master

9999999-dev

BlueImp Gallery Widget

  Sources   Download

Apache 2.0

The Requires

 

17/10 2015

0.1.0

0.1.0.0

BlueImp Gallery Widget

  Sources   Download

Apache 2.0

The Requires