Download the PHP package dlds/yii2-intercooler without Composer
On this page you can find all versions of the php package dlds/yii2-intercooler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dlds/yii2-intercooler
More information about dlds/yii2-intercooler
Files in dlds/yii2-intercooler
Package yii2-intercooler
Short Description Yii2 Intercooler extensions
License MIT
Informations about the package yii2-intercooler
Yii2 Intercooler integration
Easy integration of Intercooler.js (the easy to use Ajax handler) into Yii2 framework. Provides bunch of ready to use widgets with preddefined Intercooler requirements.
See Intercooler.js official docs on http://intercoolerjs.org
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json file.
Module Base Class
Base module class Intercooler holds all options for Intercooler required html element attributes. Also handles registering of required js files using IntercoolerAssets. It is usually init through some of included widgets.
Response Headers
Using base class static methods you are allowed to set specific intercooler headers.
X-IC-Redirect
To be able to redirect user to new url after intercooler request is done you have to set redirect header in server side.
X-IC-Refresh
To refresh intercooler elements you can set refresh header on your server side and tell intercooler which elements should be refreshed.
See what '/foo/bar' stand for in official docs
X-IC-Remove
To remove targetted element you have to set remove header on server side.
Widgets
Integration comes with buch of ready made modules based on intercooler behavior.
AjaxBlock
Helper which renders appropriate html element with required intercooler attributes.
For more widget options see AjaxBlock class documentation.
InfiniteList
Renderes Infinite ListView widget.
For more widget options see InfiniteList class documentation.