Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
toolshowsettings.php
1<?php
2
4
6use Bitrix\Intranet\Settings\Tools;
7
8final class ToolShowSettings
9{
10 private const MAIL_TOOL_ID = 'mail';
11 private const MAIL_SLIDER_CODE = 'limit_contact_center_mail_off';
12
13 private bool $isExistIntranetToolsManager;
14
15 public function __construct()
16 {
17 $this->isExistIntranetToolsManager = (
18 Loader::includeModule('intranet')
19 && class_exists('\Bitrix\Intranet\Settings\Tools\ToolsManager')
20 );
21 }
22
23 public function isMailAvailable(): bool
24 {
25 if ($this->isExistIntranetToolsManager)
26 {
27 return Tools\ToolsManager::getInstance()->checkAvailabilityByToolId(self::MAIL_TOOL_ID);
28 }
29
30 return true;
31 }
32
33 public function getMailLimitSliderCode(): string
34 {
35 return self::MAIL_SLIDER_CODE;
36 }
37}