Hooking into Tenant Switch
final readonly class HookTenantSwitchSubscription
{
/** Hooking in tenant activation */
#[OnTenantActivation]
public function whenActivated(
string|ConnectionReference $tenantConnectionName,
#[Header('tenant')] $tenantName
): void
{
echo sprintf("HOOKING into flow: Tenant name %s is about to be activated\n", $tenantName);
}
/** Hooking in tenant deactivation */
#[OnTenantDeactivation]
public function whenDeactivated(
string|ConnectionReference $tenantConnectionName,
#[Header('tenant')] $tenantName
): void
{
echo sprintf("HOOKING into flow: Tenant name %s is about to be deactivated\n", $tenantName);
}
}Last updated
Was this helpful?