33 static::PLACEMENT => [],
36 $cache = Cache::createInstance();
37 if ($cache->initCache(static::CACHE_TIME,
'allRestDescription' . LANGUAGE_ID, static::CACHE_DIR))
39 $result = $cache->getVars();
41 elseif ($cache->startDataCache())
43 $provider =
new CRestProvider();
44 $allScope = $provider->getDescription();
46 foreach ($allScope as $scope => $list)
48 foreach ($list as $method => $data)
50 if ($method ===
'_events')
52 if (!isset($result[static::EVENT][$scope]))
54 $result[static::EVENT][$scope] = [];
56 $result[static::EVENT][$scope] = array_merge($result[static::EVENT][$scope], array_keys($data));
58 elseif ($method ===
'_placements')
60 if (!isset($result[static::PLACEMENT][$scope]))
62 $result[static::PLACEMENT][$scope] = [];
64 $result[static::PLACEMENT][$scope] = array_merge($result[static::PLACEMENT][$scope], array_keys($data));
68 $result[static::METHOD][$scope][] = $method;
72 $result[static::SCOPE] = array_keys($allScope);
74 foreach ($installedModuleList as $moduleId => $moduleDescription)
76 if (!isset($description[$moduleId]))
80 if (!empty($controllersConfig[
'controllers'][
'restIntegration'][
'enabled']))
86 $result[static::SCOPE] = array_values(array_unique($result[static::SCOPE]));
88 $cache->endDataCache($result);
102 if (!is_array($scopeList))
106 $placementList = static::getAllBasicDescription()[static::PLACEMENT];
108 $placementList = array_intersect_key($placementList, array_flip($scopeList));
109 foreach ($placementList as $values)
111 $result = array_merge($result, $values);