From 84d95c064e9f128a8a8b1a9381c44933847db83d Mon Sep 17 00:00:00 2001 From: Sebastian Krupinski Date: Mon, 31 Aug 2026 22:40:53 -0400 Subject: [PATCH] refactor(module): register integrations through runtime contexts Signed-off-by: Sebastian Krupinski --- lib/Module.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/Module.php b/lib/Module.php index 273d5f4..7667183 100644 --- a/lib/Module.php +++ b/lib/Module.php @@ -2,10 +2,11 @@ namespace KTXM\UserProfile; -use KTXF\Module\ModuleBrowserInterface; +use KTXF\Module\Configuration\BrowserModuleContextInterface; +use KTXF\Module\Configuration\ModuleContextInterface; use KTXF\Module\ModuleInstanceAbstract; -class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface +class Module extends ModuleInstanceAbstract { public function __construct() { } @@ -46,16 +47,10 @@ class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface ]; } - public function registerBI(): array + public function configure(ModuleContextInterface $context): void { - return [ - 'handle' => $this->handle(), - 'namespace' => 'UserProfile', - 'version' => $this->version(), - 'label' => $this->label(), - 'author' => $this->author(), - 'description' => $this->description(), - 'boot' => 'static/module.mjs', - ]; + if ($context instanceof BrowserModuleContextInterface) { + $context->registerModule($this, 'UserProfile', 'static/module.mjs'); + } } }