bizproc::InstallDB: Bitrix method

      
<?php 
//  bizproc :: InstallDB()
//  /dist/bitrix/modules/bizproc/install/index.php:32

    
function InstallDB($install_wizard true)
    {
        global 
$DB$DBType$APPLICATION;

        
$arCurPhpVer Explode("."PhpVersion());
        if (
IntVal($arCurPhpVer[0]) < 5)
            return 
true;

        
$errors null;
        if (!
$DB->Query("SELECT 'x' FROM b_bp_workflow_instance"true))
            
$errors $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/bizproc/install/db/".$DBType."/install.sql");

        if (!empty(
$errors))
        {
            
$APPLICATION->ThrowException(implode(""$errors));
            return 
false;
        }

        
RegisterModule("bizproc");
        
RegisterModuleDependences("iblock""OnAfterIBlockElementDelete""bizproc""CBPVirtualDocument""OnAfterIBlockElementDelete");
        
RegisterModuleDependences("main""OnAdminInformerInsertItems""bizproc""CBPAllTaskService""OnAdminInformerInsertItems");
        
RegisterModuleDependences('rest''OnRestServiceBuildDescription''bizproc''\Bitrix\Bizproc\RestService''onRestServiceBuildDescription');
        
RegisterModuleDependences('rest''OnRestAppDelete''bizproc''\Bitrix\Bizproc\RestService''onRestAppDelete');
        
RegisterModuleDependences('rest''OnRestAppUpdate''bizproc''\Bitrix\Bizproc\RestService''onRestAppUpdate');
        
RegisterModuleDependences('timeman''OnAfterTMDayStart''bizproc''CBPDocument''onAfterTMDayStart');

        
COption::SetOptionString("bizproc""SkipNonPublicCustomTypes""Y");

        
$eventManager = \Bitrix\Main\EventManager::getInstance();
        
$eventManager->registerEventHandler('rest''OnRestApplicationConfigurationImport''bizproc''\Bitrix\Bizproc\Integration\Rest\AppConfiguration''onEventImportController');
        
$eventManager->registerEventHandler('rest''OnRestApplicationConfigurationExport''bizproc''\Bitrix\Bizproc\Integration\Rest\AppConfiguration''onEventExportController');
        
$eventManager->registerEventHandler('rest''OnRestApplicationConfigurationClear''bizproc''\Bitrix\Bizproc\Integration\Rest\AppConfiguration''onEventClearController');
        
$eventManager->registerEventHandler('rest''OnRestApplicationConfigurationEntity''bizproc''\Bitrix\Bizproc\Integration\Rest\AppConfiguration''getEntityList');

        return 
true;
    }