CBPVirtualDocument :: GetDocumentType: Bitrix method

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

    
public function GetDocumentType($documentId)
    {
        if (
substr($documentId0strlen("type_")) == "type_")
            return 
$documentId;

        
$documentId intval($documentId);
        if (
$documentId <= 0)
            throw new 
CBPArgumentNullException("documentId");

        
$dbResult CIBlockElement::GetList(array(), array("ID" => $documentId"SHOW_NEW" => "Y"), falsefalse, array("ID""IBLOCK_ID"));
        
$arResult $dbResult->Fetch();
        if (!
$arResult)
            throw new 
Exception("Element is not found");

        return 
"type_".$arResult["IBLOCK_ID"];
    }