Import Plan Template Registry
Contract for registering reusable migration-plan templates resolved by template key for the plan builder.
Overview
App\Services\Imports\Plans\ImportPlanTemplateRegistry holds reusable migration-plan templates (ordered multi-entity import recipes). Core RMS-migration templates register at boot; plugins contribute theirs through the registrar's planTemplate() seam (P6-22).
Public surface
| Method | Purpose |
|---|---|
register() |
Register an ImportPlanTemplateDefinition or a plugin PlanTemplateContract |
has() |
Whether a template key exists |
get() |
Resolve a template definition by key |
all() |
Every registered template |
Accepted definition shape
App\Services\Imports\Plans\ImportPlanTemplateDefinition — plugin PlanTemplateContract implementations are normalised into the same definition at registration. Contract surface: key(), name(), description(), type() (an ImportPlanType), and steps() (ordered step definitions with target models + default mappings).
Worked example
use App\Services\Imports\Plans\ImportPlanTemplateRegistry;
$registry = app(ImportPlanTemplateRegistry::class);
$registry->register($myPlanTemplate);
$template = $registry->get('current-rms-core');
$steps = $template->steps;