Download the PHP package cakedc/cakephp-datatables without Composer

On this page you can find all versions of the php package cakedc/cakephp-datatables. 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 cakephp-datatables

CakeDC Datatables plugin for CakePHP

IMPORTANT: This plugin is under heavy development now, use it at your own risk.

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

Load plugin

To bake datatable index pages.

To bake datatable index pages.

Setting up the datatable fields

You can set a simple array with the columns to print or a more complex one with render callbacks, or a mix of them.

Simple entity visible fields

Manual simple columns configuration

Set complex columns configurations with render callback.

In this case print some random number.

Set complex columns configurations with render callback.

Print data from the record, hard coded values. Also add parameters to the link URL.

Add conditions to disable links

Add the disable option in the link, with a javascript closure that returns a boolean value, true for show value without the link, and false to return it with the link, this function receives the value of the current column and the row object.

Add postLink and confirmation message

Add the type => "POST" to the link, and the message in the confirm option

NOTE: For now postLink does not support SecurityComponent, it is recommended to disable the method to use in the controller

Change method for confirmation message

The condition for the confirmation message is a javascript closure that receives the message and returns a boolean value.

A mix of simple and complex columns conditions

Will produce the following script.

Types of inputs to search in colunms:

Now have 4 types of inputs: input select select multiple date

to define the type of search need in definition of columns especificate this array:

for input type text:

not need make anything is for default:

for type select:

for type multiple:

for type date:

need jquery-ui or jquery-datepicker

it is to integrate for columns definition:

ejample:

in options is posible utilize find('list) and put names id and name. if not want to search column is necesary to especify this,

getting the datatable input delay 2 second:

Getting the datatable script.

All you need is to tell the help to create the script for you, pass the tag id to be used for the datatable.

Setting the table headers.

Optionally you can format and translate the table header as follows:

Create multiple datatables in the same template

Resets the datatable instance, and then you can set up a new one

Indicate a specific url to obtain the data

For example if you are in /pages/index but you et date from /pages/list, is usefull when you have multiple tables in the same page

Indicate specific type for ajax call

You can specify on config "ajaxType" if would that ajax calls are GET or POST, for example

Important: if you set POST you must set "unlockedActions" on Security Component, specify the target action in the controller's initialize function

Add callback when row is created

For example, if you need to add a css class (to change row color) to each tr according to a specific value in the data


$this->Datatable->setCallbackCreatedRow(
    'function( row, data, dataIndex ) {
        if (!data.viewed) {
            $(row).addClass("rowhighlight");
        }
    }'
);
``

All versions of cakephp-datatables with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
cakephp/cakephp Version ^4.3
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 cakedc/cakephp-datatables contains the following files

Loading the files please wait ....