CBPDocumentService::SetPermissions: Bitrix method

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

    
public function SetPermissions($parameterDocumentId$workflowId$arPermissions$bRewrite true)
    {
        list(
$moduleId$entity$documentId) = CBPHelper::ParseDocumentId($parameterDocumentId);

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

        if (
class_exists($entity) && method_exists($entity"SetPermissions"))
            return 
call_user_func_array(array($entity"SetPermissions"), array($documentId$workflowId$arPermissions$bRewrite));

        return 
false;
    }