CBPDocument :: _ReplaceTaskURL: Bitrix method

      
<?php 
//  CBPDocument :: _ReplaceTaskURL()
//  /dist/bitrix/modules/bizproc/classes/general/document.php:1036

    
public static function _ReplaceTaskURL($str$documentType)
    {
        
$chttp = new CHTTP();
        
$baseHref $chttp->URN2URI('');

        return 
str_replace(
            Array(
'#HTTP_HOST#''#TASK_URL#''#BASE_HREF#'),
            Array(
$_SERVER['HTTP_HOST'], ($documentType[0]=="iblock"?"/bitrix/admin/bizproc_task.php?workflow_id={=Workflow:id}":"/company/personal/bizproc/{=Workflow:id}/"), $baseHref),
            
$str
            
);
    }