1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
reservecondition.php
См. документацию.
1<?php
2
3namespace Bitrix\Sale\Reservation\Configuration;
4
5use Bitrix\Main\SystemException;
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 [
46 self::ON_CREATE,
47 self::ON_PAY,
48 self::ON_FULL_PAY,
49 self::ON_ALLOW_DELIVERY,
50 self::ON_SHIP,
51 ];
52 }
53
61 public static function isValid(string $value): bool
62 {
63 return in_array($value, self::getAvailableValues(), true);
64 }
65}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804