29 if (isset($params[
'type']))
31 $this->
setType($params[
'type']);
33 if (isset($params[
'value']))
37 if (isset($params[
'valueType']))
44 if (isset($params[
'workTime']))
49 if (isset($params[
'waitWorkDay']))
54 if (isset($params[
'inTime']) && is_array($params[
'inTime']))
68 if (is_array($properties))
70 if (isset($properties[
'TimeoutTime']))
76 isset($properties[
'TimeoutDuration'])
77 && isset($properties[
'TimeoutDurationType'])
78 && is_numeric($properties[
'TimeoutDuration'])
79 && $properties[
'TimeoutDurationType'] !==
's'
82 if ($properties[
'TimeoutDurationType'] ===
'm')
84 $properties[
'TimeoutDurationType'] =
'i';
87 'type' => static::TYPE_AFTER,
88 'value' => (
int)$properties[
'TimeoutDuration'],
89 'valueType' => $properties[
'TimeoutDurationType'],
93 if (!empty($properties[
'WaitWorkDayUser']))
95 $params[
'waitWorkDay'] =
true;
99 return new static($params);
117 if (
$type === static::TYPE_BEFORE ||
$type === static::TYPE_AFTER ||
$type === static::TYPE_IN)
139 $this->value = (int)
$value;
199 $this->workTime = (bool)$flag;
213 $this->waitWorkDay = $flag;
268 'TimeoutTimeIsLocal' =>
'N',
275 && $this->
getType() === static::TYPE_AFTER
286 $properties[
'TimeoutDuration'] = $this->
getValue();
287 $properties[
'TimeoutDurationType'] =
$valueType;
291 $properties[
'TimeoutTime'] = $this->
getBasis();
295 $intervalProperties = $this->
toArray();
296 $intervalProperties[
'worker'] = $worker;
303 $properties[
'WaitWorkDayUser'] = $worker;
setActivated(bool $activated)
__construct(array $params=null)
static createFromActivityProperties(array $properties)
setWaitWorkDay(bool $flag)
setInTime(?array $inTime)
toActivityProperties(array $documentType)
static getResponsibleUserExpression(array $documentType)
static parseDateTimeInterval($interval)
const CURRENT_DATETIME_BASIS
static getDateTimeIntervalString($interval)