Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
businesstype.php
1<?php
2
4
6
7final class BusinessType implements Fields\IField
8{
9
10 const BUSINESS_VERTICAL_ECOMMERCE = "ECOMMERCE";
11 const BUSINESS_VERTICAL_SERVICES = "SERVICES";
12
17 static function getDefaultValue()
18 {
19 return static::BUSINESS_VERTICAL_ECOMMERCE;
20
21 }
22
27 protected static function getAvailableValues(): array
28 {
29 return [static::BUSINESS_VERTICAL_ECOMMERCE, static::BUSINESS_VERTICAL_SERVICES];
30 }
31
38 static function checkValue($value): bool
39 {
40 return isset($value) && in_array($value,static::getAvailableValues());
41 }
42
46 static function available(): bool
47 {
48 return true;
49 }
50
54 static function required(): bool
55 {
56 return true;
57 }
58}