CBPVirtualDocument :: getDocumentTypeName: Bitrix method

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

    
public static function getDocumentTypeName($documentType)
    {
        if (
strpos($documentType'type_') !== 0)
            return 
$documentType;

        
$id = (int) substr($documentType5);

        
$iterator CIBlock::GetList(false,array('ID' => $id));
        
$result $iterator->fetch();
        if (!
$result)
            return 
$documentType;

        return 
$result['NAME'];
    }