-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinclude.php
More file actions
20 lines (18 loc) · 885 Bytes
/
include.php
File metadata and controls
20 lines (18 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
// Автозагрузка классов и регистрация обработчиков событий
\Bitrix\Main\Loader::registerAutoLoadClasses(
'customprojectmodule',
array(
'Osotov\\CustomProjectModule\\Config\\Config' => 'lib/Config/Config.php',
'Osotov\\CustomProjectModule\\EventHandlers\\EpilogHandler' => 'lib/EventHandlers/EpilogHandler.php',
)
);
// Регистрация обработчиков событий
$eventManager = \Bitrix\Main\EventManager::getInstance();
// Событие для корректной устновки 404 страницы, это пример регистрации обработчика
// Удалить если не требуется
$res = $eventManager->addEventHandler(
'main',
'OnEpilog',
array('Osotov\\CustomProjectModule\\EventHandlers\\EpilogHandler', 'set404Status')
);