• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/iblocksocnetbizproc.php
  • Класс: CIBlockDocumentWebdavSocnet
  • Вызов: CIBlockDocumentWebdavSocnet::GetFieldInputControl
static function GetFieldInputControl($documentType, $arFieldType, $arFieldName, $fieldValue, $bAllowSelection = false, $publicMode = false)
{
	if($storage = self::needProxyToDiskByDocType($documentType))
	{
		return self::proxyToDisk(__FUNCTION__, array(BitrixDiskBizProcDocumentCompatible::generateDocumentType($storage->getId()), $arFieldType, $arFieldName, $fieldValue, $bAllowSelection, $publicMode));
	}

	static $arDocumentFieldTypes = array();
	if (!array_key_exists($documentType, $arDocumentFieldTypes))
		$arDocumentFieldTypes[$documentType] = self::GetDocumentFieldTypes($documentType);

	$arFieldType["BaseType"] = "string";
	$arFieldType["Complex"] = false;
	if (array_key_exists($arFieldType["Type"], $arDocumentFieldTypes[$documentType]))
	{
		$arFieldType["BaseType"] = $arDocumentFieldTypes[$documentType][$arFieldType["Type"]]["BaseType"];
		$arFieldType["Complex"] = $arDocumentFieldTypes[$documentType][$arFieldType["Type"]]["Complex"];
	}

	if (!is_array($fieldValue) || is_array($fieldValue) && CBPHelper::IsAssociativeArray($fieldValue))
		$fieldValue = array($fieldValue);

	ob_start();

	if ($arFieldType["Type"] == "select")
	{
		$fieldValueTmp = $fieldValue;
		?>
		
		
			
_text" name="_text" value=" 0) { $a = array_values($fieldValueTmp); echo htmlspecialcharsbx($a[0]); } ?>"> _text', 'select');"> " name="" value="">', 'user');"> '; $fieldValueTmp = $fieldValue; $ind = -1; foreach ($fieldValue as $key => $value) { $ind++; $fieldNameId = 'id_'.$arFieldName["Field"].'__n'.$ind.'_'; $fieldNameName = $arFieldName["Field"].($arFieldType["Multiple"] ? "[n".$ind."]" : ""); if ($arFieldType["Multiple"]) echo ''; if (is_array($customMethodName) && count($customMethodName) > 0 || !is_array($customMethodName) && $customMethodName <> '') { $value1 = $value; if ($bAllowSelection && preg_match("#^{=[a-z0-9_]+:[a-z0-9_]+}$#i", trim($value1))) $value1 = null; else unset($fieldValueTmp[$key]); echo call_user_func_array( $customMethodName, array( array("LINK_IBLOCK_ID" => $arFieldType["Options"]), array("VALUE" => $value1), array( "FORM_NAME" => $arFieldName["Form"], "VALUE" => $fieldNameName ), true ) ); } else { switch ($arFieldType["Type"]) { case "int": case "double": unset($fieldValueTmp[$key]); ?> ');">'; } if ($arFieldType["Multiple"]) echo ""; if ($arFieldType["Multiple"]) echo '
'; if ($bAllowSelection) { if (in_array($arFieldType["Type"], array("file", "bool", "date", "datetime")) || (is_array($customMethodName) && count($customMethodName) > 0 || !is_array($customMethodName) && $customMethodName <> '')) { ?> _text" name="_text" value=" 0) { $a = array_values($fieldValueTmp); echo htmlspecialcharsbx($a[0]); } ?>"> _text', '');">