Skip to content
docsv0.1.0

ComponentMountingEvent

PRE event: a component is about to be mounted via {@see \Milpa\Live\Contracts\Component\ComponentDefinitionInterface::mount()}. Dispatched as `component.mounting` — pure notification, readonly, no {@see \Milpa\Events\InterceptionSlot}. Mount has no veto/short-circuit seam in this catalog (unlike {@see ComponentHandlingEvent}/ {@see ComponentRenderingEvent}): a component's initial state is not a point a plugin reasonably intercepts, only one it might want to audit (e.g. mount-time metrics, tracing).

ComponentMountingEvent::__construct()

public function __construct(string $componentName, array $props, Milpa\Live\ValueObjects\ComponentContext $context):

Parameters

Parameters of __construct()
NameTypeDescription
$componentNamestringThe component contract's registered name.
$propsarray<string, mixed>Mount-time props, exactly as passed to `mount()`.
$contextComponentContextThe ambient context `mount()` was called with.