RoutesComponent
The Routes section as a Milpa Component: its state is the table of every declared route. Method, path, name, handler, per-route middleware and the declaring plugin — the whole declaration, read-only. Declaring routes is a plugin's job (`RouteProviderInterface`); the panel shows what was declared and by whom.
RoutesComponent::__construct()
public function __construct(Milpa\Admin\Data\RoutesSource $source):Parameters
| Name | Type | Description |
|---|---|---|
| $source | Milpa\Admin\Data\RoutesSource |
RoutesComponent::contract()
public static function contract(): Milpa\Live\ValueObjects\ComponentContractThe contract: no props, a read-only state, no actions.
RoutesComponent::mount()
public function mount(array $props, Milpa\Live\ValueObjects\ComponentContext $context): Milpa\Live\ValueObjects\StateSnapshotMounts with the routes the booted plugins declare right now.
Parameters
| Name | Type | Description |
|---|---|---|
| $props | array | |
| $context | Milpa\Live\ValueObjects\ComponentContext |
RoutesComponent::handle()
public function handle(Milpa\Live\ValueObjects\InteractionRequest $request): Milpa\Live\ValueObjects\InteractionResultRefuses every action: the section is read-only.
Parameters
| Name | Type | Description |
|---|---|---|
| $request | Milpa\Live\ValueObjects\InteractionRequest |