improve module interface
This commit is contained in:
@@ -9,6 +9,7 @@ use KTXC\Service\UserAccountsService;
|
||||
use KTXC\SessionIdentity;
|
||||
use KTXF\Controller\ControllerAbstract;
|
||||
use KTXC\SessionTenant;
|
||||
use KTXF\Module\ModuleBrowserInterface;
|
||||
use KTXF\Routing\Attributes\AuthenticatedRoute;
|
||||
|
||||
class InitController extends ControllerAbstract
|
||||
@@ -21,11 +22,7 @@ class InitController extends ControllerAbstract
|
||||
private readonly PermissionChecker $permissionChecker,
|
||||
) {}
|
||||
|
||||
#[AuthenticatedRoute(
|
||||
'/init',
|
||||
name: 'init',
|
||||
methods: ['GET']
|
||||
)]
|
||||
#[AuthenticatedRoute('/init', name: 'init', methods: ['GET'])]
|
||||
public function index(): JsonResponse {
|
||||
|
||||
$configuration = [];
|
||||
@@ -33,7 +30,7 @@ class InitController extends ControllerAbstract
|
||||
// modules - filter by permissions
|
||||
$configuration['modules'] = [];
|
||||
foreach ($this->moduleManager->list() as $module) {
|
||||
if (!method_exists($module, 'bootUi')) {
|
||||
if ($module instanceof ModuleBrowserInterface === false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -44,7 +41,7 @@ class InitController extends ControllerAbstract
|
||||
continue;
|
||||
}
|
||||
|
||||
$configuration['modules'][$handle] = $module->bootUi();
|
||||
$configuration['modules'][$handle] = $module->registerBI();
|
||||
}
|
||||
|
||||
// tenant
|
||||
|
||||
Reference in New Issue
Block a user