Skip to content

Commit d887bf1

Browse files
committed
Fixes
1 parent b0e8a6d commit d887bf1

File tree

1 file changed

+4
-40
lines changed

1 file changed

+4
-40
lines changed

include.php

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,13 @@
11
<?php
22

33
use Bitrix\Main\Loader;
4-
use ProklUng\Module\Boilerplate\Options\ModuleManager;
5-
use Proklung\Symfony\Router\Subscribers\OnAfterSaveOptionsHandler;
6-
use Proklung\Symfony\Router\Subscribers\ValidatorNativeConfigs;
7-
use Proklung\Symfony\Router\Subscribers\ValidatorSymfonyConfigs;
4+
use Proklung\Symfony\Router\Utils\Bootstrap;
85

9-
Loader::registerAutoLoadClasses(
10-
'proklung.symfony.router',
6+
Loader::registerAutoLoadClasses('proklung.symfony.router',
117
[
128
'proklung_symfony_router' => 'install/index.php',
139
]
1410
);
1511

16-
$moduleManager = new ModuleManager('proklung.symfony.router');
17-
$configFilePath = $moduleManager->get('yaml_config_file_path');
18-
$cachePath = $moduleManager->get('yaml_cache_path');
19-
20-
\Bitrix\Main\EventManager::getInstance()->addEventHandler(
21-
$moduleManager->getModuleId(),
22-
'OnAfterSaveOptions',
23-
[new OnAfterSaveOptionsHandler, 'handler']
24-
);
25-
26-
\Bitrix\Main\EventManager::getInstance()->addEventHandler(
27-
$moduleManager->getModuleId(),
28-
'OnBeforeSetOption',
29-
[new ValidatorNativeConfigs, 'handler']
30-
);
31-
32-
\Bitrix\Main\EventManager::getInstance()->addEventHandler(
33-
$moduleManager->getModuleId(),
34-
'OnBeforeSetOption',
35-
[new ValidatorSymfonyConfigs, 'handler']
36-
);
37-
38-
$routerInstance = \Proklung\Symfony\Router\Utils\Loader::from($configFilePath, $cachePath);
39-
40-
if (Proklung\Symfony\Router\Utils\Loader::checkRequirements()) {
41-
$configBitrixRoutesPath = $moduleManager->get('native_config_file_path');
42-
$cacheBitrixRoutesPath = $moduleManager->get('native_yaml_cache_path');
43-
$phpConfigFile = $moduleManager->get('php_router_config_path');
44-
45-
$routeConvertor = Proklung\Symfony\Router\Utils\Loader::native($configBitrixRoutesPath, $cacheBitrixRoutesPath);
46-
if ($routeConvertor !== null) {
47-
Proklung\Symfony\Router\Utils\Loader::save($phpConfigFile, $routeConvertor);
48-
}
49-
}
12+
$bootstrapModule = new Bootstrap();
13+
$bootstrapModule->init();

0 commit comments

Comments
 (0)