Code Monkey home page Code Monkey logo

jquery-datatables-bundle's Introduction

jquery-datatables-bundle

Build Status Coverage Status Scrutinizer Code Quality Latest Stable Version Latest Unstable Version License composer.lock

Integrate jQuery DataTables with Symfony 2 and more.

jquery-datatables-bundle eases the use of jQuery DataTables to display rich DataTables in your Symfony application by providing Twig extensions and PHP objects to do the heavy lifting. The bundle include the excellent JS library jQuery DataTables and this plug-ins.

Dry out your DataTables code by writing it all in PHP !

jQuery DataTables bundle

Includes :

Provides :

  • a "wbw_jquery_datatables_delete" route to delete a managed entity by a DataTable
  • a "wbw_jquery_datatables_edit" route to edit all columns provided by a DataTable
  • a "wbw_jquery_datatables_export" route to export all managed entities by a DataTable
  • a "wbw_jquery_datatables_index" route to display a DataTable (main and columns searches is also provide with a generic implementation)
  • a "wbw_jquery_datatables_options" route to retrieve with an XML HTTP request the options of a DataTable
  • a "wbw_jquery_datatables_render" route to retrieve with an XML HTTP request the HTML rendering of a DataTable
  • a "wbw_jquery_datatables_serialize" route to retrieve with an XML HTTP request a managed entity by a DataTable into JSON format

If you like this package, pay me a beer (or a coffee) paypal.me

Compatibility

PHP Symfony

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this package:

$ composer require webeweb/jquery-datatables-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:

    public function registerBundles() {
        $bundles = [
            // ...
            new WBW\Bundle\CoreBundle\WBWCoreBundle(),
            new WBW\Bundle\BootstrapBundle\WBWBootstrapBundle(),
            new WBW\Bundle\JQuery\DataTablesBundle\WBWJQueryDataTablesBundle(),
        ];

        // ...

        return $bundles;
    }

Once the bundle is added then do:

$ php bin/console wbw:core:unzip-assets
$ php bin/console assets:install

Add the bundle assets in the app/config/config.yml file of your project:

# ...
# Core configuration
wbw_core:
    plugins:
        - "jquery"

# Bootstrap configuration
wbw_bootstrap:
    version: 3

# jQuery DataTables configuration
wbw_jquery_datatables:
    theme: "bootstrap"
    plugins:
        - "responsive"

IMPORTANT NOTICE: For use with Bootstrap 4, replace '3' by '4' into wbw_bootstrap.version and 'bootstrap' by 'bootstrap4' into wbw_jquery_datatables.theme.

Add the bundle routing in the app/config/routing.yml file of your project:

# ...
wbw_jquery_datatables:
    prefix:   "/"
    resource: "@WBWJQueryDataTablesBundle/Resources/config/routing.yml"

Usage

Read the documentation.

Testing

To test the package, is better to clone this repository on your computer. Open a command console and execute the following commands to download the latest stable version of this package:

$ git clone https://github.com/webeweb/jquery-datatables-bundle.git
$ cd jquery-datatables-bundle
$ composer install

Once all required libraries are installed then do:

$ vendor/bin/phpunit

License

jquery-datatables-bundle is released under the MIT License. See the bundled LICENSE file for details.

Donate

If you like this work, please consider donating at paypal.me

jquery-datatables-bundle's People

Contributors

webeweb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.