• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/marketplace/client.php
  • Класс: BitrixRestMarketplaceClient
  • Вызов: Client::setAvailableUpdate
static function setAvailableUpdate($updateList = array())
{
	if(!is_array($updateList) || count($updateList) <= 0)
	{
		$cnt = 0;
		$optionValue = "";
	}
	else
	{
		$cnt = count($updateList);
		$optionValue = array();

		foreach($updateList as $update)
		{
			if(is_array($update['VERSIONS']) && count($update['VERSIONS']) > 0)
			{
				$optionValue[$update["CODE"]] = max(array_keys($update["VERSIONS"]));
			}
		}

		$optionValue = serialize($optionValue);
	}

	Option::set("rest", "mp_num_updates", $cnt);
	Option::set("rest", "mp_updates", $optionValue);
}