Download the PHP package deviantlab/tabulator-bundle without Composer

On this page you can find all versions of the php package deviantlab/tabulator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tabulator-bundle

Ux Tabulator Bundle

A Symfony bundle that integrates Tabulator (a JavaScript table/datagrid library) into Symfony applications via Stimulus. Tables are declared as PHP classes, rendered with a single Twig function, and — for server-side pagination/sorting/filtering — backed by an auto-registered controller that queries Doctrine ORM entities or native DBAL connections on your behalf.

Installation

Before you start, make sure you have StimulusBundle configured in your app.

Install the bundle using Composer and Symfony Flex:

If you're using WebpackEncore, install your assets and restart Encore (not needed if you're using AssetMapper):

Usage

1. Define a table type

A table is described by a class implementing TableInterface. The bundle ships two abstract base classes depending on your data source:

Any service tagged (auto-configured) with TableInterface is automatically registered as a deviantlab.tabulator.table_type, so as long as autowiring/autoconfiguration is enabled for your services, no extra wiring is needed.

The getName() value must be unique across all table types — it identifies the table in the auto-generated data endpoint (/{_tableName}, route deviantlab_tabulatorbundle_get_data) and is used to resolve the type from the container.

For a native/DBAL-backed table, extend AbstractNativeTableType instead and implement getConnectionName() and getQueryBuilder(Connection $connection, array $params).

2. Build and render the table

Use TableFactory to turn a table type into a Table instance (this also wires up the Ajax endpoint automatically), then render it with the render_table() Twig function:

This renders a single <div> with Stimulus controller attributes; the deviantlab--tabulator-bundle--tabulator Stimulus controller (bundled in assets/dist/tabulator_controller.js) reads the serialized options and boots the Tabulator instance in the browser.

3. Configuring columns

Column maps closely to Tabulator's own column definition options (title, field, width, widthGrow, widthShrink, resizable, minWidth, maxWidth, frozen, headerSort, headerHozAlign, hozAlign, vertAlign, print, etc.) plus a set of strategy objects:

4. Table-level options

Table exposes fluent setters for the most common Tabulator options: layout, height/minHeight/maxHeight, rowHeight, autoResize, resizableColumnFit, selectableRows, locale, placeholder, printHeader, dataTree (and its dataTreeStartExpanded/dataTreeFilter/dataTreeSort flags), columnCalcs / groupClosedShowCalcs / dataTreeChildColumnCalcs, rowHeader (a RowHeader for row selection/handle columns), editTriggerEvent, columnHeaderSortMulti, headerSortClickElement / headerSortElement, popupContainer, initialSort / initialFilter, and the dataLoader/dataLoaderLoading/dataLoaderError/ dataLoaderErrorTimeout options.

Ajax configures the request Tabulator makes for remote data: url, params, method, contentType and arbitrary headers (addHeader()).

Pagination configures mode (PaginationMode::LOCAL/REMOTE), size, initialPage, the query parameter names sent to the server (pageParamName, sizeParamName), sizeSelector and counter. Remote pagination requires the table to already have an Ajax configured, otherwise a LogicException is thrown.

5. Server-side pagination, sorting and filtering

When SortMode::REMOTE, FilterMode::REMOTE or PaginationMode::REMOTE are used, Tabulator sends the current page/sort/filter state to the Ajax URL, and the bundle's TableController (mounted on /{_tableName}) resolves the matching OrmTableHandler or NativeTableHandler to build the query, apply pagination/sorting/filtering, and serialize the result as JSON.

You can customize how a specific field is sorted or filtered by returning a SortOverride / FilterOverride from your table type:

Use configureQuery(Query $query) (ORM tables) to tweak the built Doctrine Query (e.g. hints, result cache), and doTransform(array $items, array $params): array to post-process the fetched rows before they're serialized to the client.

Testing


All versions of tabulator-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
symfony/flex Version ^2.0
symfony/twig-bundle Version ^6.4|^7.0
doctrine/doctrine-bundle Version ^2.12
symfony/serializer Version ^6.4|^7.0
doctrine/orm Version ^3.0
symfony/stimulus-bundle Version ^2.13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package deviantlab/tabulator-bundle contains the following files

Loading the files please wait ...