Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
restrictioninfo.php
1<?php
2
4
5final class RestrictionInfo
6{
7 private string $restrictionType;
8 private array $options;
9
10 public function __construct(string $restrictionType, array $options = [])
11 {
12 $this->options = $options;
13 $this->restrictionType = $restrictionType;
14 }
15
16 public function getType(): string
17 {
18 return $this->restrictionType;
19 }
20
21 public function getOption(string $optionId)
22 {
23 return $this->options[$optionId] ?? null;
24 }
25
26 public function setOption(string $optionId, $value): void
27 {
28 $this->options[$optionId] = $value;
29 }
30
31 public function getOptions(): array
32 {
33 return $this->options;
34 }
35}
__construct(string $restrictionType, array $options=[])