Common interface for all extensions. An extension can be a plugin (e.g. {@link ScrollerPlugin}, {@link ColReorderPlugin}), a feature (e.g. {@link PaginationTypeBootstrapFeature}, {@link AbstractFilteringFeature}add-on) or a theme (e.g. {@link Bootstrap2Theme}).
An extension can be composed of :
- one or more JsResource, i.e. Javascript code externalized in a file
- one or more CssResource, i.e. CSS code externalized in a file
- one or more Parameter, i.e. one or more specific DataTables parameters that will be used during the DataTables initialization
- an AbstractConfigurationGenerator if the extension needs its own configuration generator. The one used for the main DataTables configuration is the {@link DatatablesGenerator}. You can also take a look at the {@link ColumnFilteringGenerator} to see the configuration generated for theColumn Filtering add-on.
- a potential Javascript function name that will be called after DataTables initialization.
Example : columnFilter oTable_myTableId = $('#myTableId').dataTable(oTable_myTableId_params).columnFilter({...});
- Javascript code to add in the main JS resource, i.e. the resource that contains the DataTables initilization Javascript code. You can add Javascript code at multiple locations in this file thanks to the following attributes :
- beforeAll
- beforeStartDocumentReady
- afterStartDocumentReady
- beforeEndDocumentReady
- afterAll
These attributes can be visualized in the following Javascript snippet : => BEFOREALL var oTable_tableId = $('#myTableId'); var oTable_tableId_params = {...}; => BEFORESTARTDOCUMENTREADY $(document).ready(function(){ => AFTERSTARTDOCUMENTREADY oTable_myTableId = $('#myTableId').dataTable(oTable_myTableId_params); => BEFOREENDDOCUMENTREADY }); => AFTERALL
@author Thibault Duchateau
@since 0.7.1
@see ExtensionLoader
@see ExtensionProcessor