• Модуль: fileman
  • Путь к файлу: ~/bitrix/modules/fileman/classes/general/file_input.php
  • Класс: CFileInput
  • Вызов: CFileInput::DisplayControl
static function DisplayControl($inputs = array())
{
	self::$menuNew = array();
	self::$menuExist = array();

	if ($inputs['upload'])
	{
		self::$menuNew[] = array("ID" => "upload", "GLOBAL_ICON" => "adm-menu-upload-pc", "TEXT" => GetMessage("ADM_FILE_UPLOAD"), "CLOSE_ON_CLICK" => false);
		self::$menuExist[] = array("ID" => "upload", "GLOBAL_ICON" => "adm-menu-upload-pc", "TEXT" => GetMessage("ADM_FILE_NEW_UPLOAD"), "CLOSE_ON_CLICK" => false);
	}
	if ($inputs['medialib'])
	{
		self::$menuNew[] = array("TEXT" => GetMessage("ADM_FILE_MEDIALIB"), "GLOBAL_ICON" => "adm-menu-upload-medialib", "ONCLICK" => "OpenMedialibDialog".self::$jsId."()");
		self::$menuExist[] = array("TEXT" => GetMessage("ADM_FILE_NEW_MEDIALIB"), "GLOBAL_ICON" => "adm-menu-upload-medialib", "ONCLICK" => "OpenMedialibDialog".self::$jsId."()");
	}
	if ($inputs['file_dialog'])
	{
		self::$menuNew[] = array("TEXT" => GetMessage("ADM_FILE_SITE"), "GLOBAL_ICON" => "adm-menu-upload-site", "ONCLICK" => "OpenFileDialog".self::$jsId."()");
		self::$menuExist[] = array("TEXT" => GetMessage("ADM_FILE_NEW_SITE"), "GLOBAL_ICON" => "adm-menu-upload-site", "ONCLICK" => "OpenFileDialog".self::$jsId."()");
	}

	if ($inputs['cloud'])
	{
		self::$menuNew[] = array("TEXT" => GetMessage("ADM_FILE_CLOUD"), "GLOBAL_ICON" => "adm-menu-upload-cloud", "ONCLICK" => "OpenCloudDialog".self::$jsId."()");
		self::$menuExist[] = array("TEXT" => GetMessage("ADM_FILE_NEW_CLOUD"), "GLOBAL_ICON" => "adm-menu-upload-cloud", "ONCLICK" => "OpenCloudDialog".self::$jsId."()");
	}

	$arConfig = array(
		'id' => self::$jsId,
		'fileExists' => self::$bFileExists,
		'files' => self::$curFiles,
		'menuNew' => self::$menuNew,
		'menuExist' => self::$menuExist,
		'multiple' => self::$bMultiple,
		'useUpload' => self::$bUseUpload,
		'useMedialib' => self::$bUseMedialib,
		'useFileDialog' => self::$bUseFileDialog,
		'useCloud' => self::$bUseCloud,
		'delName' => self::$delInputName,
		'descName' => self::$descInputName,
		'inputSize' => self::$inputSize,
		'minPreviewHeight' => self::$minPreviewHeight,
		'minPreviewWidth' => self::$minPreviewWidth,
		'showDesc' => self::$bShowDescInput,
		'showDel' => self::$bShowDelInput,
		'maxCount' => self::$maxCount,
		'viewMode' => self::$bViewMode
	);

	if (self::$bMultiple)
		$arConfig['inputNameTemplate'] = self::$inputNameTemplate;
	else
		$arConfig['inputs'] = self::$arInputs;

	if (self::$bUseCloud)
		$arConfig['cloudDialogPath'] = '/bitrix/admin/clouds_file_search.php?lang='.LANGUAGE_ID.'&n=';


	//Base container
	?>
$arFile) self::DisplayFile($arFile, $ind); ?>