Beispiel #1
0
 protected function loadDataProcesses()
 {
     $this->arResult['SYSTEM_PROCESSES'] = array();
     $this->arResult['USER_PROCESSES'] = array();
     try {
         $defaultSiteId = CSite::getDefSite();
         $iterator = CSite::getByID($defaultSiteId);
         $site = $iterator->fetch();
         $defaultLang = $site ? $site['LANGUAGE_ID'] : 'en';
         if ($defaultLang == 'ua') {
             $defaultLang = 'ru';
         }
         \Bitrix\Lists\Importer::loadDataProcesses($defaultLang, true, $this->arResult['SYSTEM_PROCESSES']);
         \Bitrix\Lists\Importer::loadDataProcesses($defaultLang, false, $this->arResult['USER_PROCESSES']);
         $this->checkForIblock($this->arResult['SYSTEM_PROCESSES']);
         $this->checkForIblock($this->arResult['USER_PROCESSES']);
     } catch (Exception $e) {
         $this->errors[] = $e->getMessage();
     }
     if (empty($this->arResult['SYSTEM_PROCESSES']) && empty($this->arResult['USER_PROCESSES'])) {
         $this->errors[] = Loc::getMessage('CC_LCP_NOT_PROCESSES');
     }
 }