1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
IntranetUserFilter.php
См. документацию.
1
<?php
2
3
declare(strict_types=1);
4
5
6
namespace
Bitrix\Socialnetwork\Collab\Controller\Filter;
7
8
use Bitrix\Intranet\ActionFilter\IntranetUser;
9
use Bitrix\Main\Engine\ActionFilter\Base;
10
use Bitrix\Main\Error;
11
use Bitrix\Main\Event;
12
use Bitrix\Main\EventResult;
13
use Bitrix\Main\Loader;
14
15
class
IntranetUserFilter
extends
Base
16
{
17
public
function
onBeforeAction
(
Event
$event
): ?
EventResult
18
{
19
if
(!Loader::includeModule(
'intranet'
))
20
{
21
$this->
addError
(
new
Error
(
'Intranet module is not installed'
,
'intranet_required'
));
22
23
return
new
EventResult
(EventResult::ERROR,
null
,
null
, $this);
24
}
25
26
$filter
=
new
IntranetUser();
27
28
$eventResult =
$filter
->onBeforeAction(
$event
);
29
30
$errors
=
$filter
->getErrors();
31
foreach
(
$errors
as
$error
)
32
{
33
$this->
addError
($error);
34
}
35
36
return
$eventResult;
37
}
38
}
Bitrix\Main\Engine\ActionFilter\Base
Определения
base.php:15
Bitrix\Main\Engine\ActionFilter\Base\addError
addError(Error $error)
Определения
base.php:80
Bitrix\Main\Error
Определения
error.php:15
Bitrix\Main\Event
Определения
event.php:5
Bitrix\Main\EventResult
Определения
eventresult.php:5
Bitrix\Socialnetwork\Collab\Controller\Filter\IntranetUserFilter
Определения
IntranetUserFilter.php:16
Bitrix\Socialnetwork\Collab\Controller\Filter\IntranetUserFilter\onBeforeAction
onBeforeAction(Event $event)
Определения
IntranetUserFilter.php:17
$errors
$errors
Определения
iblock_catalog_edit.php:74
$filter
$filter
Определения
iblock_catalog_list.php:54
$event
$event
Определения
prolog_after.php:141
$error
$error
Определения
subscription_card_product.php:20
bitrix
modules
socialnetwork
lib
Collab
Controller
Filter
IntranetUserFilter.php
Создано системой
1.14.0