SchedulerEventTable :: deleteBySubscription: Bitrix method

      
<?php 
//  Bitrix\Bizproc\SchedulerEventTable :: deleteBySubscription()
//  /dist/bitrix/modules/bizproc/lib/schedulerevent.php:50

    
public static function deleteBySubscription($workflowId$handler$eventModule$eventType$entityId null)
    {
        
$connection Main\Application::getConnection();
        
$sqlHelper $connection->getSqlHelper();

        
$table $sqlHelper->forSql(static::getTableName());
        
$workflowId $sqlHelper->forSql($workflowId);
        
$handler $sqlHelper->forSql($handler);
        
$eventModule $sqlHelper->forSql($eventModule);
        
$eventType $sqlHelper->forSql($eventType);
        
$entityId $entityId !== null $sqlHelper->forSql($entityId) : null;

        
$connection->queryExecute("DELETE 
            FROM 
{$table} 
            WHERE 
                WORKFLOW_ID = '
{$workflowId}
                AND HANDLER = '
{$handler}
                AND EVENT_MODULE = '
{$eventModule}
                AND EVENT_TYPE = '
{$eventType}'"
                
.($entityId !== null " AND ENTITY_ID = '{$entityId}'" '')
        );
    }