1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
sharingfeature.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\Sharing;
4
5use Bitrix\Main\Result;
6use Bitrix\Main\Config\Option;
7use Bitrix\Main\Loader;
8use Bitrix\CalendarMobile;
9
11{
12 private const SHARING_OPTION_NAME = 'isSharingEnabled';
13 private const OPTION_ENABLED = 'Y';
14 private const OPTION_DISABLED = 'N';
15
20 public static function enable(): Result
21 {
22 $result = new Result();
23 Option::set('calendar', self::SHARING_OPTION_NAME, self::OPTION_ENABLED);
24 if (Loader::includeModule('calendarmobile'))
25 {
26 $r = CalendarMobile\JSComponent::enable();
27 $result->addErrors($r->getErrors());
28 }
29
30 return $result;
31 }
32
37 public static function disable(): Result
38 {
39 $result = new Result();
40 Option::set('calendar', self::SHARING_OPTION_NAME, self::OPTION_DISABLED);
41 if (Loader::includeModule('calendarmobile'))
42 {
43 $r = CalendarMobile\JSComponent::disable();
44 $result->addErrors($r->getErrors());
45 }
46
47 return $result;
48 }
49
54 public static function isEnabled(): bool
55 {
56 return true;
57 }
58}
$result
Определения get_property_values.php:14