RegularTemplateTaskReplicator extends AbstractReplicator
Replicate an entity based on data from another entity.
Table of Contents
Constants
- AGENT_TEMPLATE = 'CTasks::RepeatTaskByTemplateId(#ID#);'
- DEBUG_KEY = 'tasks_use_new_replication_use_debug'
- EMPTY_AGENT = ''
- ENABLE_MUTEX = 'tasks_use_mutex'
- ENABLE_RECALCULATION = 'tasks_use_recalculation'
- ENABLE_TIME_PRIORITY = 'tasks_use_time_priority'
- ENABLED_KEY = 'tasks_use_new_replication'
Methods
- __construct() : mixed
- disableTimeZone() : void
- enableTimeZone() : void
- getAgentName() : string
- getNextTimeByTemplateId() : string
- getPayloadKey() : string
- Returns the key by which it is convenient to obtain the value of the replication result.
- isDebug() : bool
- Enable or disable debug logging.
- isEnabled() : bool
- Enable or disable replication.
- isMutexEnabled() : bool
- isRecalculationEnabled() : bool
- isTimePriorityEnabled() : bool
- replicate() : ReplicationResult
- Replicates an entity.
- startReplication() : void
- startReplicationAndUpdateTemplate() : void
- stopReplication() : void
Constants
AGENT_TEMPLATE
public
mixed
AGENT_TEMPLATE
= 'CTasks::RepeatTaskByTemplateId(#ID#);'
DEBUG_KEY
public
mixed
DEBUG_KEY
= 'tasks_use_new_replication_use_debug'
EMPTY_AGENT
public
mixed
EMPTY_AGENT
= ''
ENABLE_MUTEX
public
mixed
ENABLE_MUTEX
= 'tasks_use_mutex'
ENABLE_RECALCULATION
public
mixed
ENABLE_RECALCULATION
= 'tasks_use_recalculation'
ENABLE_TIME_PRIORITY
public
mixed
ENABLE_TIME_PRIORITY
= 'tasks_use_time_priority'
ENABLED_KEY
public
mixed
ENABLED_KEY
= 'tasks_use_new_replication'
Methods
__construct()
public
__construct([int $userId = 0 ]) : mixed
Parameters
- $userId : int = 0
disableTimeZone()
public
disableTimeZone() : void
enableTimeZone()
public
enableTimeZone() : void
getAgentName()
public
static getAgentName(int $templateId) : string
Parameters
- $templateId : int
Return values
stringgetNextTimeByTemplateId()
public
getNextTimeByTemplateId(int $templateId[, string $baseTime = '' ]) : string
Parameters
- $templateId : int
- $baseTime : string = ''
Return values
stringgetPayloadKey()
Returns the key by which it is convenient to obtain the value of the replication result.
public
static getPayloadKey() : string
Return values
stringisDebug()
Enable or disable debug logging.
public
isDebug() : bool
Return values
boolisEnabled()
Enable or disable replication.
public
static isEnabled() : bool
Return values
boolisMutexEnabled()
public
static isMutexEnabled() : bool
Return values
boolisRecalculationEnabled()
public
static isRecalculationEnabled() : bool
Return values
boolisTimePriorityEnabled()
public
static isTimePriorityEnabled() : bool
Return values
boolreplicate()
Replicates an entity.
public
replicate(int $entityId[, bool $force = false ]) : ReplicationResult
Parameters
- $entityId : int
- $force : bool = false
Return values
ReplicationResultstartReplication()
public
startReplication(int $templateId) : void
Parameters
- $templateId : int
startReplicationAndUpdateTemplate()
public
startReplicationAndUpdateTemplate(int $templateId, array<string|int, mixed> $replicateParameters) : void
Parameters
- $templateId : int
- $replicateParameters : array<string|int, mixed>
stopReplication()
public
stopReplication(int $templateId) : void
Parameters
- $templateId : int