Download the PHP package paskuale75/yii2-widget-datatables without Composer
On this page you can find all versions of the php package paskuale75/yii2-widget-datatables. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download paskuale75/yii2-widget-datatables
More information about paskuale75/yii2-widget-datatables
Files in paskuale75/yii2-widget-datatables
Package yii2-widget-datatables
Short Description DataTables widget for Yii2 with Bootstrap 4
License MIT
Informations about the package yii2-widget-datatables
DataTables widget for Yii2
This extension provides the DataTables integration for the Yii2 framework.
Installation
The preferred way to install this extension is through composer.
With Composer installed, you can then install the extension using the following commands:
composer require --prefer-dist paskuale75/yii2-widget-datatables "*"
Command installs the datatables widget.
You can also add (instead of the second command):
to the require section of your composer.json
file.
Usage
Use DataTables as any other other Yii2 widget.
This extension uses the Bootstrap integration plugin to provide a Yii2 style by default.
The TableTools plugin is also available. Specify the DOM and the tableTools settings in the clientOptions array as the following example.
You can also use DataTables in the JavaScript layer of your application. To achieve this, you need to include DataTables as a dependency of your Asset file. In this case, you could use yii\grid\GridView or using the datatables options retrieve => true to avoid errors. In both case all options must be in the Javascript object.
Internationalization or i18n Plugin
All of dataTable's utterances are translatable. Select your prefer translation from (https://datatables.net/plug-ins/i18n/)
You can override datatables's translations by setting the application's message source in the main configuration, like so:
<?php
// ...
'components' => [
// ... other components ...
'i18n' => [
'translations' => [
// ... other translations ...
'dtable' => [ // override pluto's standard messages
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@app/messages', // this is a default
'sourceLanguage' => 'it', // this as well
],
],
],
// ... still more components ...
]
All versions of yii2-widget-datatables with dependencies
bower-asset/jquery Version >= 1.7.0
bower-asset/datatables.net Version *
bower-asset/datatables.net-bs4 Version *
bower-asset/datatables.net-select-bs4 Version *
bower-asset/datatables.net-buttons-bs4 Version *