1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
TaskData.php
См. документацию.
1<?php
2
3namespace Bitrix\Bizproc\Task\Data;
4
6{
7 public readonly int $id;
8 public readonly string $workflowId;
9 private array $data;
10
11 private function __construct(int $id, string $workflowId, array $data)
12 {
13 $this->id = $id;
14 $this->workflowId = $workflowId;
15
16 $this->data = $data;
17 }
18
19 public static function createFromArray(array $data): ?static
20 {
21 if (!isset($data['ID']) || !is_numeric($data['ID']))
22 {
23 return null;
24 }
25
26 $workflowId = $data['WORKFLOW_ID'] ?? null;
27 if (empty($workflowId) || !is_string($workflowId))
28 {
29 $workflowId = $data['PARAMETERS']['WORKFLOW_ID'] ?? null;
30 if (empty($workflowId) || !is_string($workflowId))
31 {
32 return null;
33 }
34 }
35
36 return new static((int)$data['ID'], $workflowId, $data);
37 }
38
39 public function getData(): array
40 {
41 return $this->data;
42 }
43
44 public function getParameters(): ?array
45 {
46 return $this->data['PARAMETERS'] ?? null;
47 }
48
49 public function setParameters(array $parameters): self
50 {
51 $this->data['PARAMETERS'] = $parameters;
52
53 return $this;
54 }
55
56 public function getDocumentId(): ?array
57 {
58 return $this->data['PARAMETERS']['DOCUMENT_ID'] ?? null;
59 }
60}
readonly string $workflowId
Определения TaskData.php:8
setParameters(array $parameters)
Определения TaskData.php:49
readonly int $id
Определения TaskData.php:7
static createFromArray(array $data)
Определения TaskData.php:19
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804