1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Text.php
См. документацию.
1<?php
2declare(strict_types=1);
3
4namespace Bitrix\Landing\Copilot\Data\Node;
5
6use Bitrix\Landing\Copilot\Data\Type\NodeType;
7
8class Text extends Node
9{
10 protected const TYPE = NodeType::Text;
11
12 private ?array $values;
13 private ?array $genderData = null;
14
15 public function __construct(string $code, array $data)
16 {
17 parent::__construct($code, $data);
18 $this->values = $data['values'] ?? [];
19 }
20
21 public function toArray(): array
22 {
23 $data = parent::toArray();
24 $data['genderData'] = $this->getGenderData();
25
26 return $data;
27 }
28
29 public function setData(array $data): void
30 {
31 $this->setValues($data);
32
33 if (isset($data['genderData']))
34 {
35 $this->genderData = $data['genderData'];
36 }
37 }
38
39 public function getValues(?int $position = null): array
40 {
41 return $this->values;
42 }
43
44 protected function setValues(array $values): self
45 {
46 $this->values = $values;
47
48 return $this;
49 }
50
51 public function setGenderData(array $genderData): self
52 {
53 // todo: need node type checking!
54 $this->genderData = $genderData;
55
56 return $this;
57 }
58
59 // todo: use trait for repeated methods
60 public function getGenderData(): ?array
61 {
62 return $this->genderData;
63 }
64}
setGenderData(array $genderData)
Определения Text.php:51
__construct(string $code, array $data)
Определения Text.php:15
setData(array $data)
Определения Text.php:29
getValues(?int $position=null)
Определения Text.php:39
setValues(array $values)
Определения Text.php:44
$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
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
Определения base32.php:2