Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
tasksuite.php
1<?php
2
4
6{
10 private $id;
11
15 private $poolId;
16
20 private $tasks;
21
25 public function getId(): int
26 {
27 return $this->id;
28 }
29
35 public function setId(int $id): TaskSuite
36 {
37 $this->id = $id;
38
39 return $this;
40 }
41
45 public function getPoolId(): int
46 {
47 return $this->poolId;
48 }
49
55 public function setPoolId(int $poolId): TaskSuite
56 {
57 $this->poolId = $poolId;
58
59 return $this;
60 }
61
65 public function getTasks(): array
66 {
67 return $this->tasks;
68 }
69
75 public function setTasks(array $tasks): TaskSuite
76 {
77 $this->tasks = $tasks;
78
79 return $this;
80 }
81
82
83 public function toArray(): array
84 {
85 $tasks = [];
86 foreach ($this->tasks as $task)
87 {
88 $tasks[] = $task->toArray();
89 }
90
91 return [
92 'pool_id' => $this->poolId,
93 'tasks' => $tasks
94 ];
95 }
96}