• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/usertypewebdav.php
  • Класс: CUserTypeWebdavElement
  • Вызов: CUserTypeWebdavElement::GetPublicViewHTML
function GetPublicViewHTML($arUserField, $id, $params = "", $settings = array(), $matches = array())
{
	if(BitrixMainConfigOption::get('disk', 'successfully_converted', false) && CModule::includeModule('disk'))
	{
		return (is_array($matches) ? $matches[0] : '');
	}
	$set = array();
	if (is_array($settings) && !empty($settings))
	{
		if (array_key_exists("imageWidth", $settings) && array_key_exists("imageHeight", $settings))
			$set["MAX_SIZE"] = array("width" => $settings["imageWidth"], "height" => $settings["imageHeight"]);
		if (array_key_exists("imageHtmlWidth", $settings) && array_key_exists("imageHtmlHeight", $settings))
			$set["HTML_SIZE"] = array("width" => $settings["imageHtmlWidth"], "height" => $settings["imageHtmlHeight"]);
	}
	if ($params != '' && is_string($params) && preg_match_all("/(width|height)=(d+)/is", $params, $matches))
		$params = array_combine($matches[1], $matches[2]);
	ob_start();
	$arParams = [
		"arUserField" => $arUserField,
		"arSettings" => $set,
		"MOBILE" => ((is_array($settings) && array_key_exists("bMobile", $settings) && $settings["bMobile"]) ? "Y"
			: "N"),
	];
	$arResult = ["VALUE" => [$id]];
	CWebDavInterface::UserFieldViewThumb(
			$arParams,
			$arResult,
			null,
			array($id => $params));
	return ob_get_clean();
}