DeleteStatusTitle: Bitrix method

      
<?php 
//  DeleteStatusTitle()
//  /dist/bitrix/modules/bizproc/classes/general/activity.php:394

    
public function DeleteStatusTitle($title '')
    {
        if (
$title == '')
            return;

        
$stateService $this->workflow->GetService("StateService");
        
$mainTitle $stateService->GetStateTitle($this->GetWorkflowInstanceId());

        
$ar1 explode(":"$mainTitle);
        if (
count($ar1) <= 1)
            return;

        
$newTitle "";

        
$ar2 explode(","$ar1[1]);
        foreach (
$ar2 as $a)
        {
            
$a trim($a);
            if (
$a != $title)
            {
                if (
strlen($newTitle) > 0)
                    
$newTitle .= ", ";
                
$newTitle .= $a;
            }
        }

        
$result $ar1[0].(strlen($newTitle) > ": " "").$newTitle;

        
$stateService->SetStateTitle($this->GetWorkflowInstanceId(), $result);
    }