Skip to content
Corex

BlueprintActivator

Corex\Kit\BlueprintActivator · class · Add-ons layer

Applies a planned kit: enables its feature flags, activates its module plugins, and seeds the kit’s pages (composing its patterns; one becomes the front page). The side-effecting half of the setup wizard, kept apart from the admin screen (one actor: site provisioning). Page handling is classified by the pure {@see PagePlanner} into create / adopt / skip (spec 041): a page whose slug is absent is created; a pre-existing empty page (or an un-populated kit placeholder) is adopted — populated in place; a page that already holds user content is skipped untouched. The front page is set after the loop whenever the declared home was created or adopted, so a kit apply never leaves a blank front page. Each page records its disposition in _corex_kit_page (created | adopted | replaced | suffixed), and a page the kit replaces or adopts first records what it was ({@see PageRecord}), as do the reading settings before the front page is set, so a reset can put the owner’s pages back rather than delete them (spec 115). Returns an {@see ApplyOutcome} the wizard renders as a summary (and spec 042 reuses).

__construct(PluginActivationInspector $pluginActivationInspector, PagePlanner $planner, PageContent $content, ConflictResolver $conflicts)

Section titled “__construct(PluginActivationInspector $pluginActivationInspector, PagePlanner $planner, PageContent $content, ConflictResolver $conflicts)”

apply(array $plan, array $choices): ApplyOutcome

Section titled “apply(array $plan, array $choices): ApplyOutcome”

Read-only: classify the declared pages against current site state (no writes) — the basis of the activation preview (spec 042). The same classification a real apply uses.

seedPages(array $pages, array $modules, array $flags, array $choices): ApplyOutcome

Section titled “seedPages(array $pages, array $modules, array $flags, array $choices): ApplyOutcome”