25 $cache = Cache::createInstance();
26 if ($cache->initCache(static::CACHE_TIME,
'all' . LANGUAGE_ID, static::CACHE_DIR))
28 $result = $cache->getVars();
30 elseif ($cache->startDataCache())
33 $eventDictionaryResult = [];
34 foreach ($eventDictionary as $event)
36 $eventDictionaryResult[mb_strtoupper($event[
'code'])] = $event;
38 $eventList = CRestUtil::getEventList();
39 $eventDistinctId = [];
40 foreach ($eventList as $type => $events)
42 foreach ($events as $event)
44 if (array_key_exists($event, $eventDictionaryResult) && !in_array(mb_strtoupper($event), $eventDistinctId))
46 $event = mb_strtoupper($event);
47 $eventDistinctId[] = $event;
51 'name' => !empty($eventDictionaryResult[$event][
'name'])
52 ? $eventDictionaryResult[$event][
'name'] .
' (' . $event .
')' : $event,
53 'descr' => !empty($eventDictionaryResult[$event][
'descr'])
54 ? $eventDictionaryResult[$event][
'descr'] :
'',
59 $cache->endDataCache($result);