Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
reservecondition.php
1<?php
2
4
6
13{
14 public const ON_CREATE = 'O';
15 public const ON_PAY = 'R';
16 public const ON_FULL_PAY = 'P';
17 public const ON_ALLOW_DELIVERY = 'D';
18 public const ON_SHIP = 'S';
19
30 public static function validate(string $value): void
31 {
32 if (!self::isValid($value))
33 {
34 throw new SystemException("Invalid reserve condition value: '{$value}'");
35 }
36 }
37
43 public static function getAvailableValues(): array
44 {
45 return [
51 ];
52 }
53
61 public static function isValid(string $value): bool
62 {
63 return in_array($value, self::getAvailableValues(), true);
64 }
65}