File::formatValuePrintable: Bitrix method

      
<?php 
//  Bitrix\Bizproc\BaseType\File :: formatValuePrintable()
//  /dist/bitrix/modules/bizproc/lib/basetype/file.php:67

    
protected static function formatValuePrintable(FieldType $fieldType$value)
    {
        
$value = (int) $value;
        
$iterator = \CFile::getByID($value);
        if (
$file $iterator->fetch())
        {
            return 
'[url=/bitrix/tools/bizproc_show_file.php?f='.urlencode($file['FILE_NAME']).'&hash='
                
.md5($file['FILE_NAME'])
                .
'&i='.$value.'&h='.md5($file['SUBDIR']).']'
                
.htmlspecialcharsbx($file['ORIGINAL_NAME'])
                .
'[/url]';
        }

        return 
'';
    }