Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
base.php
1<?php
2
4
5use Bitrix\Intranet\ActionFilter;
9
10class Base extends Controller
11{
12 protected int $userId;
13
14 protected function getDefaultPreFilters(): array
15 {
16 $preFilters = parent::getDefaultPreFilters();
17
18 if (Loader::includeModule('intranet'))
19 {
20 $preFilters[] = new ActionFilter\UserType([
21 'employee',
22 'extranet',
23 'email',
24 'replica',
25 ]);
26 }
27
28 return $preFilters;
29 }
30
31 protected function init(): void
32 {
33 parent::init();
34 $this->userId = CurrentUser::get()->getId();
35 }
36}
static includeModule($moduleName)
Definition loader.php:69