CBPVirtualDocument::GetDocumentFieldTypes: Bitrix method

      
<?php 
//  CBPVirtualDocument :: GetDocumentFieldTypes()
//  /dist/bitrix/modules/bizproc/classes/general/virtualdocument.php:1638

    
public function GetDocumentFieldTypes($documentType)
    {
        
$typesMap FieldType::getBaseTypesMap();

        
$arResult = array(
            
"S" => array("Name" => GetMessage("BPVDX_STRING"), "BaseType" => "string"'typeClass' => $typesMap[FieldType::STRING]),
            
"T" => array("Name" => GetMessage("BPVDX_TEXT"), "BaseType" => "text"'typeClass' => $typesMap[FieldType::TEXT]),
            
"N" => array("Name" => GetMessage("BPVDX_NUM"), "BaseType" => "double"'typeClass' => $typesMap[FieldType::DOUBLE]),
            
"L" => array("Name" => GetMessage("BPVDX_LIST"), "BaseType" => "select""Complex" => true'typeClass' => $typesMap[FieldType::SELECT]),
            
"F" => array("Name" => GetMessage("BPVDX_FILE"), "BaseType" => "file"'typeClass' => $typesMap[FieldType::FILE]),
            
"B" => array("Name" => GetMessage("BPVDX_YN"), "BaseType" => "bool"'typeClass' => $typesMap[FieldType::BOOL]),
        );

        foreach (
CIBlockProperty::GetUserType() as  $ar)
        {
            
$t $ar["PROPERTY_TYPE"].":".$ar["USER_TYPE"];

            if(
$t == "S:ECrm")
            {
                
$t "E:ECrm";
            }

            if (
COption::GetOptionString("bizproc""SkipNonPublicCustomTypes""N") == "Y"
                
&& !array_key_exists("GetPublicEditHTML"$ar) && $t != "S:UserID" && $t != "S:DateTime")
                continue;

            
$arResult[$t] = array("Name" => $ar["DESCRIPTION"], "BaseType" => "string"'typeClass' => BizprocType\UserTypeProperty::class);
            if (
$t == "S:UserID")
            {
                
$arResult[$t]["BaseType"] = "user";
                
$arResult[$t]['typeClass'] = $typesMap[FieldType::USER];
            }
            elseif (
$t == "S:employee" && COption::GetOptionString("bizproc""employee_compatible_mode""N") != "Y")
            {
                
$arResult[$t]["BaseType"] = "user";
                
$arResult[$t]['typeClass'] = BizprocType\UserTypePropertyEmployee::class;
            }
            elseif (
$t == "S:DateTime")
            {
                
$arResult[$t]["BaseType"] = "datetime";
                
$arResult[$t]["typeClass"] = $typesMap[FieldType::DATETIME];
            }
            elseif (
$t == "S:Date")
            {
                
$arResult[$t]["BaseType"] = "date";
                
$arResult[$t]["typeClass"] = $typesMap[FieldType::DATE];
            }
            elseif (
$t == "E:EList")
            {
                
$arResult[$t]["BaseType"] = "string";
                
$arResult[$t]["Complex"] = true;
                
$arResult[$t]['typeClass'] = BizprocType\UserTypePropertyElist::class;
            }
            elseif (
$t == 'S:HTML')
            {
                
$arResult[$t]['typeClass'] = BizprocType\UserTypePropertyHtml::class;
            }
            elseif(
$t == 'S:DiskFile')
            {
                
$arResult[$t]["BaseType"] = "int";
                
$arResult[$t]['typeClass'] = BizprocType\UserTypePropertyDiskFile::class;
            }
            elseif(
$t == 'E:ECrm')
            {
                
$arResult[$t]["BaseType"] = "string";
                
$arResult[$t]["Complex"] = true;
                
$arResult[$t]['typeClass'] = BizprocType\ECrm::class;
            }
        }

        return 
$arResult;
    }