1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
EventOptionsDto.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Calendar\EventOption\Dto
;
4
5
use
Bitrix\Main\Type\Contract\Arrayable
;
6
7
final
class
EventOptionsDto
implements
\JsonSerializable,
Arrayable
8
{
9
public
function
__construct
(
10
public
readonly ?
int
$maxAttendees
11
)
12
{
13
}
14
15
public
static
function
fromArray
(
array
$data
): self
16
{
17
return
new
self
(
18
maxAttendees:
$data
[
'max_attendees'
],
19
);
20
}
21
22
public
static
function
fromJson
(
string
$json): ?self
23
{
24
$array = json_decode($json,
true
);
25
if
(!$array) {
26
return
null
;
27
}
28
29
return
self::fromArray
($array);
30
}
31
32
public
function
toArray
():
array
33
{
34
return
[
35
'maxAttendees'
=> $this->maxAttendees,
36
];
37
}
38
39
public
function
jsonSerialize
():
array
40
{
41
return
$this->
toArray
();
42
}
43
}
Bitrix\Calendar\EventOption\Dto\EventOptionsDto
Определения
EventOptionsDto.php:8
Bitrix\Calendar\EventOption\Dto\EventOptionsDto\fromArray
static fromArray(array $data)
Определения
EventOptionsDto.php:15
Bitrix\Calendar\EventOption\Dto\EventOptionsDto\fromJson
static fromJson(string $json)
Определения
EventOptionsDto.php:22
Bitrix\Calendar\EventOption\Dto\EventOptionsDto\toArray
toArray()
Определения
EventOptionsDto.php:32
Bitrix\Calendar\EventOption\Dto\EventOptionsDto\__construct
__construct(public readonly ?int $maxAttendees)
Определения
EventOptionsDto.php:9
Bitrix\Calendar\EventOption\Dto\EventOptionsDto\jsonSerialize
jsonSerialize()
Определения
EventOptionsDto.php:39
$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
Bitrix\Main\Type\Contract\Arrayable
Определения
arrayable.php:6
Bitrix\Calendar\EventOption\Dto
Определения
EventOptionsDto.php:3
bitrix
modules
calendar
lib
EventOption
Dto
EventOptionsDto.php
Создано системой
1.14.0