• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/engine/scopemanager.php
  • Класс: BitrixRestEngineScopeManager
  • Вызов: ScopeManager::getList
public function getList() : array
{
	$langScope = Application::getDocumentRoot() . BX_ROOT . '/modules/rest/scope.php';
	Loc::loadMessages($langScope);
	$result = [];
	foreach ($this->listScope() as $code)
	{
		$key = mb_strtoupper($code);
		if (mb_strtoupper($key) === 'LOG')
		{
			$name = Loc::getMessage('REST_SCOPE_LOG_MSGVER_1');
			$description = Loc::getMessage('REST_SCOPE_LOG_DESCRIPTION_MSGVER_1');
		}
		else
		{
			$name = Loc::getMessage('REST_SCOPE_' . $key);
			$description = Loc::getMessage('REST_SCOPE_' . $key . '_DESCRIPTION');
		}

		$result[$code] = [
			'code' => $code,
			'title' => ($name) ? $name . ' (' . $code . ')' : $code,
			'description' => $description
		];
	}

	return $result;
}