This document explains the bundle route loading strategy.
The bundle currently exposes one generic Ajax fragments route:
zhortein_datatable_fragments
Path:
/_zhortein/datatable/{name}/fragments
Allowed methods:
GET
POST
The route is used by the Stimulus controller to refresh server-rendered datatable fragments.
Host applications should import the bundle routes explicitly.
Example with PHP routing config:
<?php
declare(strict_types=1);
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
return static function (RoutingConfigurator $routes): void {
$routes->import('@ZhorteinDatatableBundle/config/routes.php');
};Example with YAML routing config:
zhortein_datatable:
resource: '@ZhorteinDatatableBundle/config/routes.php'The default generated URL looks like:
/_zhortein/datatable/users/fragments
For a datatable named users.
Bundle-owned route names must be prefixed with:
zhortein_datatable_
This avoids collisions with application routes.
Applications may wrap or replace the default route later if they need:
- firewall-specific paths;
- customer portal paths;
- admin-only paths;
- custom access control;
- additional route parameters.
The bundle route must remain generic and application-agnostic.
The route prefix is not configurable yet.
Multiple route contexts, such as internal and external portals, are not implemented yet.
Route-level security is left to the host application configuration.