Download the PHP package sjaakp/yii2-cycle2 without Composer

On this page you can find all versions of the php package sjaakp/yii2-cycle2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-cycle2

yii2-cycle2

Cycle2 jQuery slide show for Yii 2.0

yii2-cycle2 is a widget to render the excellent Cycle2 jQuery slideshow widget in the Yii 2.0 PHP Framework. Like a GridView, its data is fed from an ActiveDataProvider (or, more generally, from a class derived from BaseDataProvider).

A demonstration of Yii2-cycle2 is here.

Installation

Install yii2-cycle2 with Composer. Either add the following to the require section of your composer.json file:

"sjaakp/yii2-cycle2": "*"

Or run:

composer require sjaakp/yii2-cycle2 "*"

You can manually install yii2-cycle2 by downloading the source in ZIP-format.

Using yii2-cycle2

yii2-cycle2 implements a widget of the class Cycle. It gets its data from an ActiveDataProvider, ArrayDataProvider, or other class derived from BaseDataProvider Using it is not unlike using a GridView. For instance, in the Controller you might have something like:

To render a Cycle in the View we could use:

...
<?= Cycle::widget([
    'dataProvider' => $dataProvider,
    'imgAttribute' => 'photo',
    'captionAttributes' => [
        'name',
        'country'
    ],
    'overlayAttributes' => [
        'description'
    ],
    'options' => [
        'speed' => 2000
    ],
]) ?>
...

Options

Cycle has the following options:

dataProvider

The data provider for the widget. This property is required. In most cases, it will be an ActiveDataProvider or an ArrayDataProvider.

imgAttribute

Image attribute, required.

urlAttribute

Link URL attribute, optional.

tooltipAttribute

Tooltip attribute, optional.

captionAttributes, overlayAttributes

The attributes displayed in the caption or the overlay. See the Cycle2 documentation.

Members can be:

The attribute values will be rendered inside Cycle's caption or overlay div, each inside its own span element with class "slide-<key>".

content

Extra elements in the Cycle container, apart from the slides, caption, and overlay. Could be filled with elements like '<div class="cycle-pager"></div>' (see: Cycle2 pagers).

plugins

Plugins for the Cycle2 jQuery widget. Notice that yii2-cycle2 attempts to load the required plugins automatically.

options

Client options for the underlying Cycle2 jQuery widget. Notice that the option names must be camelCased.

htmlOptions

HTML options of the Cycle container. Use this if you want to explicitly set the ID.

slideOptions

HTML options for each slide. One use would be to set this to: [ 'target' => '_blank' ]


All versions of yii2-cycle2 with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version *
bower-asset/jquery-cycle2 Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sjaakp/yii2-cycle2 contains the following files

Loading the files please wait ....