1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
Text.php
См. документацию.
1
<?php
2
declare(strict_types=1);
3
4
namespace
Bitrix\Landing\Copilot\Data\Node;
5
6
use Bitrix\Landing\Copilot\Data\Type\NodeType;
7
8
class
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
}
Bitrix\Landing\Copilot\Data\Node\Text\setGenderData
setGenderData(array $genderData)
Определения
Text.php:51
Bitrix\Landing\Copilot\Data\Node\Text\__construct
__construct(string $code, array $data)
Определения
Text.php:15
Bitrix\Landing\Copilot\Data\Node\Text\toArray
toArray()
Определения
Text.php:21
Bitrix\Landing\Copilot\Data\Node\Text\setData
setData(array $data)
Определения
Text.php:29
Bitrix\Landing\Copilot\Data\Node\Text\TYPE
const TYPE
Определения
Text.php:10
Bitrix\Landing\Copilot\Data\Node\Text\getValues
getValues(?int $position=null)
Определения
Text.php:39
Bitrix\Landing\Copilot\Data\Node\Text\getGenderData
getGenderData()
Определения
Text.php:60
Bitrix\Landing\Copilot\Data\Node\Text\setValues
setValues(array $values)
Определения
Text.php:44
$data
$data['IS_AVAILABLE']
Определения
.description.php:13
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
Bitrix\Landing\Copilot\Data\Node
Определения
Icon.php:4
Bitrix\Main\Text
Определения
base32.php:2
bitrix
modules
landing
lib
Copilot
Data
Node
Text.php
Создано системой
1.14.0