OpenXE/classes/Modules/Wizard/Bootstrap.php

60 lines
1.2 KiB
PHP
Raw Normal View History

2021-05-21 08:49:41 +02:00
<?php
namespace Xentral\Modules\Wizard;
use Xentral\Core\DependencyInjection\ContainerInterface;
final class Bootstrap
{
/**
* @return array
*/
public static function registerServices()
{
return [
'WizardService' => 'onInitWizardService',
];
}
/**
* @return array
*/
public static function registerJavascript()
{
return [
'wizard' => [
'./classes/Modules/Wizard/www/js/wizard.js',
],
];
}
/**
* @return array
*/
public static function registerStylesheets()
{
return [
'wizard' => [
'./classes/Modules/Wizard/www/css/wizard.css',
],
];
}
/**
* @param ContainerInterface $container
*
* @return WizardService
*/
public static function onInitWizardService(ContainerInterface $container)
{
/** @var \ApplicationCore $app */
$app = $container->get('LegacyApplication');
return new WizardService(
$container->get('Database'),
$container->get('UserConfigService'),
$app->erp
);
}
}