CBPDocumentService::GetDocumentFields: Bitrix method

      
<?php 
//  CBPDocumentService :: GetDocumentFields()
//  /dist/bitrix/modules/bizproc/classes/general/documentservice.php:234

    
public function GetDocumentFields($parameterDocumentType$importExportMode false)
    {
        list(
$moduleId$entity$documentType) = CBPHelper::ParseDocumentId($parameterDocumentType);

        if (
strlen($moduleId) > 0)
        {
            
CModule::IncludeModule($moduleId);
        }

        if (
class_exists($entity))
        {
            
$fields call_user_func_array(array($entity"GetDocumentFields"), array($documentType$importExportMode));
            if (
is_array($fields))
            {
                foreach (
$fields as $key => $prop)
                {
                    if (
$prop["Type"] === 'integer')
                    {
                        
$fields[$key]["Type"] = 'int';
                    }
                    if (empty(
$prop['BaseType']))
                    {
                        if (
in_array($prop["Type"], ["int""double""date""datetime""user""string""bool""file""text""select"]))
                        {
                            
$fields[$key]["BaseType"] = $prop["Type"];
                        }
                        else
                        {
                            
$fields[$key]["BaseType"] = "string";
                        }
                    }
                }
            }

            return 
$fields;
        }

        return 
null;
    }