Plugin Export Registry
Contract for registering plugin export sources resolved by export key for the export engine and workflow actions.
Overview
App\Services\Exports\PluginExportRegistry catalogues plugin-provided export sources. Registered handlers appear as export sources in the Export Centre and are invocable from the export workflow action; plugins register through the registrar's exportableModel() seam (P6-22).
Public surface
| Method | Purpose |
|---|---|
register() |
Register a handler class by export key |
registerExportable() |
Register an ExportableModelContract instance |
has() |
Whether an export key exists |
resolve() |
Instantiate the PluginExportHandler for a key |
label() |
Human label for a key |
keys() |
Every registered export key |
options() |
Key/label pairs for source pickers |
Accepted definition shape
App\Contracts\Exports\ExportableModelContract (extends PluginExportHandler): key() and label() identify the source; query() scopes rows per user (+ optional filters); columns() returns the per-user column definitions. Rendering flows through the core renderers (CSV/XLSX/JSON/PDF) with costs.view gating applied by the engine, not the handler.
Worked example
use App\Services\Exports\PluginExportRegistry;
$registry = app(PluginExportRegistry::class);
$registry->registerExportable($myExportable);
$handler = $registry->resolve('acme.warehouse_rows');
$options = $registry->options(); // Export Centre source picker