Skip to content
This repository has been archived by the owner on Dec 31, 2019. It is now read-only.

Installation

benjaminu edited this page Dec 6, 2012 · 6 revisions

Using composer (Symfony > 2.0)

Add datatable bundle in your composer.json as below:

    "require": {
        ...
        "ali/datatable": "dev-master"
    }
    "repositories": [
        ...
        {
            "type": "vcs",
            "url": "https://github.com/kiddivouchers/AliDatatableBundle"
        }
    ],

Update/install with this command:

php composer.phar update ali/datatable

Enable the bundle

register the bundle

    public function registerBundles()
    {
        $bundles = array(
            ...
            new Ali\DatatableBundle\AliDatatableBundle(),
        );

[Optional] create files to override desired source services.

XXX/
    - DatatableBundle/
        - Resources/
            - config/
                - services.yml
        - Twig/
            - Extension/
                - XXXDatatableExtension.php
        - Util/
            - Datatable.php

[Optional] When overriding desired source services add service override config to XXX/DatatableBundle/Resources/config/services.yml, e.g.

parameters:
    datatable.class: XXX\DatatableBundle\Util\Datatable

services:
    datatable:
        class: '%datatable.class%'
        arguments: [ '@service_container' ]
        scope: prototype

    datatable.twig.extension:
        class: XXX\DatatableBundle\Twig\Extension\XXXDatatableExtension
        arguments: [ '@service_container' ]
        tags:
            -  { name: twig.extension }

generate the assets symlinks

$ app/console assets:install --symlink web