Integrate jQuery QueryBuilder with Symfony 2 and more
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
API
Data
Decorator
DependencyInjection
Exception
Resources
Rule
Tests
.coveralls.yml
.gitattributes
.gitignore
.scrutinizer.yml
.travis.yml
JQueryQueryBuilderBundle.php
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

jquery-querybuilder-bundle

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

Integrate jQuery QueryBuilder with Symfony 2 and more.

jquery-querybuilder-bundle eases the use of jQuery QueryBuilder in your Symfony application by providing Twig extensions and PHP objects to do the heavy lifting. The bundle include the excellent JS library jQuery QueryBuilder.

Dry out your jQuery QueryBuilder code by writing it all in PHP !

IMPORTANT NOTICE: This package is still under development. Any changes will be done without prior notice to consumers of this package. Of course this code will become stable at a certain point, but for now, use at your own risk.

Includes:


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-querybuilder "^1.0"

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\JQuery\QueryBuilderBundle\JQueryQueryBuilderBundle(),
        ];

        // ...

        return $bundles;
    }

Once the bundle is added then do:

$ php bin/console assets:install

Usage

Template

{# AppBundle/Resources/views/layout.html.twig #}
{% block styles %}
    {{ parent() }}
    {% include "@JQueryQueryBuilder/include/style/jquery-querybuilder.html.twig" %}
{% endblock %}
{% block scripts %}
    {{ parent() }}
    {% include "@JQueryQueryBuilder/include/script/jquery-querybuilder.html.twig" %}
{% endblock %}

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:

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

Once all required libraries are installed then do:

$ vendor/bin/phpunit

License

jquery-querybuilder-bundle is released under the LGPL License. See the bundled LICENSE file for details.