CBPHelper :: GetFieldInputValuePrintable: Bitrix method

      
<?php 
//  CBPHelper :: GetFieldInputValuePrintable()
//  /dist/bitrix/modules/bizproc/classes/general/helper.php:1618

    
public static function GetFieldInputValuePrintable($documentType$arFieldType$fieldValue)
    {
        
$result $fieldValue;

        switch (
$arFieldType['Type'])
        {
            case 
"user":
                
$result CBPHelper::UsersArrayToString($fieldValuenull$documentType);
                break;

            case 
"bool":
                if (
is_array($fieldValue))
                {
                    
$result = array();
                    foreach (
$fieldValue as $r)
                        
$result[] = ((strtoupper($r) == "Y") ? GetMessage("BPVDX_YES") : GetMessage("BPVDX_NO"));
                }
                else
                {
                    
$result = ((strtoupper($fieldValue) == "Y") ? GetMessage("BPVDX_YES") : GetMessage("BPVDX_NO"));
                }
                break;

            case 
"file":
                if (
is_array($fieldValue))
                {
                    
$result = array();
                    foreach (
$fieldValue as $r)
                    {
                        
$r intval($r);
                        
$dbImg CFile::GetByID($r);
                        if (
$arImg $dbImg->Fetch())
                            
$result[] = "[url=/bitrix/tools/bizproc_show_file.php?f=".urlencode($arImg["FILE_NAME"])."&i=".$r."]".htmlspecialcharsbx($arImg["ORIGINAL_NAME"])."[/url]";
                    }
                }
                else
                {
                    
$fieldValue intval($fieldValue);
                    
$dbImg CFile::GetByID($fieldValue);
                    if (
$arImg $dbImg->Fetch())
                        
$result "[url=/bitrix/tools/bizproc_show_file.php?f=".urlencode($arImg["FILE_NAME"])."&i=".$fieldValue."]".htmlspecialcharsbx($arImg["ORIGINAL_NAME"])."[/url]";
                }
                break;
            case 
"select":
                if (isset(
$arFieldType["Options"][$fieldValue]))
                    
$result $arFieldType["Options"][$fieldValue];

                break;
        }

        return 
$result;
    }