Skip to content

Files

Latest commit

595286f · Feb 10, 2023

History

History
50 lines (39 loc) · 1.17 KB

installation.md

File metadata and controls

50 lines (39 loc) · 1.17 KB

Installation

Step 1: Installation

For Symfony Flex installation you need to enable community recipes:

  composer config extra.symfony.allow-contrib true

Install

  composer require aziz403/ux-datatable

Step 2: Enable the bundle (Optional)

Enable the bundle in the kernel (not needed with symfony flex):

<?php
// config/bundles.php

return [
    // ...
    Aziz403\UX\Datatable\DatatableBundle::class => ['all' => true],
];

And add your global datatable configuration in

datatable:
  # Load i18n data from DataTables CDN or locally
  language_from_cdn: true
  # Language of the Datatables (if language_from_cdn true)
  language: 'en'
  # Default options to load into DataTables
  # options:
  #    stateSave: true
  # Default parameters to be passed to the template
  template_parameters:
    # Default Datatables style (one from none,bootstrap3,bootstrap4,bootstrap5,foundation,bulma,jqueryui)
    style: 'bootstrap5'
    # Default class attribute to apply to the root table elements (change it to be compatible with the style)
    className: 'table table-striped'

See Docs for more about configuration.