1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
config.php
См. документацию.
1<?php
2
4
6
10class Config
11{
12 private string $name;
13 private string $type;
14 private ?string $placeholder;
15 private ?bool $disabled;
16
22 public function __construct(string $name, ?string $type = null)
23 {
24 $this->name = $name;
25 $this->type = $type ?? Types::TEXT;
26 }
27
33 public function getType(): string
34 {
35 return $this->type;
36 }
37
45 public function setName(string $value): self
46 {
47 $this->name = $value;
48
49 return $this;
50 }
51
57 public function getName(): string
58 {
59 return $this->name;
60 }
61
69 public function setPlaceholder(string $value): self
70 {
71 $this->placeholder = $value;
72
73 return $this;
74 }
75
83 public function setDisabled(bool $value): self
84 {
85 $this->disabled = $value;
86
87 return $this;
88 }
89
96 public function toArray(): array
97 {
98 $result = [
99 'NAME' => $this->name,
100 'TYPE' => $this->type,
101 ];
102
103 if (isset($this->placeholder))
104 {
105 $result['PLACEHOLDER'] = $this->placeholder;
106 }
107
108 if (isset($this->disabled))
109 {
110 $result['DISABLED'] = $this->disabled;
111 }
112
113 return $result;
114 }
115}
$type
Определения options.php:106
setName(string $value)
Определения config.php:45
setPlaceholder(string $value)
Определения config.php:69
__construct(string $name, ?string $type=null)
Определения config.php:22
setDisabled(bool $value)
Определения config.php:83
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
Form FILTER_ACTION disabled
Определения options.php:358
$result
Определения get_property_values.php:14
$name
Определения menu_edit.php:35