generated from Nodarx/template
refactor(module): register integrations through runtime contexts
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
+7
-12
@@ -4,10 +4,11 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace KTXM\FirewallManager;
|
namespace KTXM\FirewallManager;
|
||||||
|
|
||||||
use KTXF\Module\ModuleBrowserInterface;
|
use KTXF\Module\Configuration\BrowserModuleContextInterface;
|
||||||
|
use KTXF\Module\Configuration\ModuleContextInterface;
|
||||||
use KTXF\Module\ModuleInstanceAbstract;
|
use KTXF\Module\ModuleInstanceAbstract;
|
||||||
|
|
||||||
final class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface
|
final class Module extends ModuleInstanceAbstract
|
||||||
{
|
{
|
||||||
public function handle(): string { return 'firewall_manager'; }
|
public function handle(): string { return 'firewall_manager'; }
|
||||||
public function label(): string { return 'Firewall Manager'; }
|
public function label(): string { return 'Firewall Manager'; }
|
||||||
@@ -26,16 +27,10 @@ final class Module extends ModuleInstanceAbstract implements ModuleBrowserInterf
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerBI(): array
|
public function configure(ModuleContextInterface $context): void
|
||||||
{
|
{
|
||||||
return [
|
if ($context instanceof BrowserModuleContextInterface) {
|
||||||
'handle' => $this->handle(),
|
$context->registerModule($this, 'FirewallManager', 'static/module.mjs');
|
||||||
'namespace' => 'FirewallManager',
|
}
|
||||||
'version' => $this->version(),
|
|
||||||
'label' => $this->label(),
|
|
||||||
'author' => $this->author(),
|
|
||||||
'description' => $this->description(),
|
|
||||||
'boot' => 'static/module.mjs',
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user