Download the PHP package survos/simple-datatables-bundle without Composer

On this page you can find all versions of the php package survos/simple-datatables-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 simple-datatables-bundle

Survos Simple Datatables Bundle

Integrates the Simple Datatables library (https://github.com/fiduswriter/simple-datatables/) as a Symfony UX Stimulus controller, and provides Twig components for common rendering.

Migrating to Grid Bundle

Simple Datatables remains supported and is appropriate when a lighter table library meets the application’s needs. It is not deprecated. If an application already uses survos/api-grid-bundle, use survos/grid-bundle for its fast in-memory tables: the shared Grid dependency is already included. If an in-memory table is sufficient and the application does not already use API Grid, ask the application owner to choose Grid or simple-datatables before migrating. Use API Grid when API-backed pagination and filtering are required. Grid is heavier than simple-datatables, but gives both paths one DataTables implementation and Bootstrap 5 / Tabler theme. Optional extensions load lazily. This guide describes an explicit application migration; installing Grid does not automatically replace existing components.

1. Inventory and install

Find uses of simple_datatables, simple_item_grid, Survos\SimpleDatatables, direct Stimulus mounts, custom CSS and JavaScript hooks. Check both backend="simple" and backend="ux" tables. Record representative routes and importmap pin counts before changing them.

Install a published Grid release that includes the shared base, extensions and options component properties. Confirm the release is available through your configured Composer repositories; an older release can install successfully without those features.

For local bundle development, install normally first, then run the mono checkout's linking tool:

Never add Composer type: path repositories or fabricated package-version overrides to application manifests or lockfiles. mono/link changes the local vendor tree; deployment must use published packages and a portable Composer lockfile. Locally linked code is not proof that the locked release contains the same features.

2. Replace a table component

Before:

After:

Existing usage Grid migration
simple_datatables grid
perPage pageLength
backend="simple" or backend="ux" Remove; Grid uses DataTables
data, named columns, column blocks Preserve; local blocks still receive row, column, idx
search, info, useDatatables, condition, tableId, tableClasses Supported; set explicitly where behavior matters
Translation and scrolling defaults Set trans and scrollY explicitly to preserve the old page
activate Remove; use useDatatables to control enhancement
Survos\SimpleDatatables\Model\Column objects Rebuild as Survos\Grid\Model\Column or supported column arrays; do not pass legacy objects
simple_item_grid Review and migrate to item_grid; its field blocks receive data, not row

A remoteUrl grid fetches its collection once and paginates/searches in the browser. Supply explicit named columns. Local PHP Twig blocks do not render remote rows. Use API Grid for server-side pagination, facets and browser-side Twig rendering; it requires API Platform and is a separate migration.

Do not merely rename the controller on a manually authored <table>. Prefer the Twig component, which puts the Grid controller on a stable wrapper with a table target. DataTables moves the table during initialization; mounting the controller on that table can cause repeated connect/disconnect cycles. Grid's controller identifier is survos--grid-bundle--grid.

3. Configure assets and optional features

Keep the controller lazy and CSS imports inside the controller:

Grid owns DataTables pins through its assets/package.json → symfony.importmap. Compare existing application versions with that manifest: importmap:install downloads existing pins but does not upgrade all stale versions. Use importmap:require package@version for the required corrections. Do not add DataTables CSS to global controllers.json autoimports.

Port only features the application uses. For example, responsive behavior needs both the extension and its configuration:

Review old simple-datatables/Pentiminax events, options and CSS selectors individually; these are not interchangeable APIs. See the Grid README for supported extensions and the API Grid README for the server-driven path.

4. Verify, then remove legacy dependencies

Check search, both sort directions, page sizes, pagination, empty data, links, custom cells and Turbo navigation away/back. Test any remote endpoint and requested extensions. Inspect the browser console and network: a plain Grid should not download unused extensions, and pages without tables should not load DataTables unless another consumer requires it. Compare pin counts before/after separately from actual network downloads.

Showcase's /browse page provides a local reference over 23 sites; tree-demo's /playground/topics compares Grid backends. Showcase's base-Grid smoke test does not establish API Grid facet or pagination correctness. Repeat verification using the published packages without local links before deployment.

Once all consumers have moved:

A transitive consumer such as survos/folio-bundle may still require the old bundle. Migrate that consumer first; do not force removal. Remove direct Pentiminax requirements only after its own call sites are migrated. Inspect recipe cleanup and remove unused legacy bundle configuration, routes, controller registrations and importmap pins only when no remaining consumer needs them. Keep this cleanup scoped to the application being migrated.

Stimulus Controller (Tables)

To turn any HTML <table> into a datatable, simply add the stimulus controller to the tag:

Twig Component: simple_datatables

This component renders a <table> and wires up the datatable stimulus controller.

Notes:

Twig Component: simple_item_grid

simple_item_grid renders a single item/record as a definition list (<dl>), which is handy for a “show” page.

Component: Survos\SimpleDatatables\Components\ItemGridComponent. Template: templates/components/item.html.twig.

Basic usage

simple_item_grid renders the fields you list in columns for a single associative array or object passed as data:

Columns

Columns can be strings or Column-style arrays. For the item grid template, name and title are the relevant fields.

Excluding fields

The exclude option is used when the component auto-generates columns. Auto-generation currently only kicks in when data is a list of rows and columns is omitted.

Custom rendering with blocks

For custom rendering, define a block named after the column’s name. The block receives data.

Stimulus

The wrapper <div> can be wired to a stimulus controller via stimulusController. By default it uses @survos/grid/item_grid.

Complete Project

Cut and paste to create a new Symfony project with a dynamic, searchable datatable, without writing a single line of JavaScript. No webpack or build step either.

Or even easier, use the Twig component. To simplify the example we're going to add the fetch and json_decode functions to Twig; normally that would be done in the controller, but the copy/paste is faster this way.

Troubleshooting a static table

Use @survos/simple-datatables-bundle/table in stimulus_controller(). Older README examples omitted -bundle, producing an identifier that did not match the registered UX controller. Rendered data-controller attributes alone do not prove that Stimulus connected. See issue #2.

The rendered identifier should be survos--simple-datatables-bundle--table. Check that assets/controllers.json enables table under @survos/simple-datatables-bundle, the application starts Stimulus, and the browser console has no missing-import errors. Run php bin/console importmap:install after installation. The controller exposes perPage and search; it does not expose a sortable Stimulus value.

For Survos applications that also need API-backed tables, survos/grid-bundle provides the shared DataTables base used by survos/api-grid-bundle. It is a heavier foundation than simple-datatables, chosen for shared behavior and integration across the platform. This is a migration direction, not a claim that existing simple-datatables applications have already migrated.


All versions of simple-datatables-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
survos/kit-bundle Version ^2.5
symfony/config Version ^7.4||^8.1
symfony/dependency-injection Version ^7.4||^8.1
symfony/http-kernel Version ^7.4||^8.1
symfony/options-resolver Version ^7.4||^8.1
symfony/stimulus-bundle Version ^2.32 || ^3.0
symfony/ux-twig-component Version ^2.32 || ^3.0
twig/twig Version ^3.4|^4.0
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 survos/simple-datatables-bundle contains the following files

Loading the files please wait ...