1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Service.php
См. документацию.
1<?php
2
3namespace Bitrix\Socialnetwork\Space;
4
5use Bitrix\Main\Config\Option;
6
7final class Service
8{
9 public static function isAvailable(bool $isPublic = false): bool
10 {
11 if ($isPublic)
12 {
13 return \CUserOptions::getOption('socialnetwork.space', 'space_enabled', 'N') === 'Y';
14 }
15
16 $isSpaceEnabled = Option::get('socialnetwork', 'space_enabled', 'N') === 'Y';
17 if (!$isSpaceEnabled)
18 {
19 return \CUserOptions::getOption('socialnetwork.space', 'space_enabled', 'N') === 'Y';
20 }
21
22 return true;
23 }
24}
static isAvailable(bool $isPublic=false)
Определения Service.php:9