Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
department.php
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Livefeed\RenderParts
;
4
5
use
Bitrix\Main\Localization\Loc
;
6
use
Bitrix\Main\Loader
;
7
use
Bitrix\Socialnetwork\Helper\Path
;
8
9
Loc::loadMessages
(__FILE__);
10
11
final
class
Department
extends
Base
12
{
13
public
function
getData
($entityId = 0): array
14
{
15
static
$departmentPath =
null
;
16
17
$result = $this->
getMetaResult
();
18
$options
= $this->
getOptions
();
19
20
if
(
21
$entityId > 0
22
&& Loader::includeModule(
'iblock'
)
23
&& ($res = \CIBlockSection::getByID($entityId))
24
&& ($iblockSection = $res->fetch())
25
)
26
{
27
$result[
'id'
] = $entityId;
28
$result[
'name'
] = $iblockSection[
"NAME"
];
29
30
if
(
31
empty(
$options
[
'skipLink'
])
32
|| !
$options
[
'skipLink'
]
33
)
34
{
35
if
($departmentPath ===
null
)
36
{
37
$departmentPath = (
38
(!isset(
$options
[
'mobile'
]) || !
$options
[
'mobile'
])
39
&& (!isset(
$options
[
'im'
]) || !
$options
[
'im'
])
40
? Path::get(
'department_path_template'
)
41
:
''
42
);
43
}
44
if
(!empty($departmentPath))
45
{
46
$result[
'link'
] = \CComponentEngine::makePathFromTemplate(
47
$departmentPath,
48
array(
49
"ID"
=> $entityId
50
)
51
);
52
}
53
}
54
}
55
56
return
$result;
57
}
58
}
Bitrix\Main\IO\Path
Definition
path.php:11
Bitrix\Main\Loader
Definition
loader.php:12
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Socialnetwork\Livefeed\RenderParts\Base
Definition
base.php:5
Bitrix\Socialnetwork\Livefeed\RenderParts\Base\$options
$options
Definition
base.php:6
Bitrix\Socialnetwork\Livefeed\RenderParts\Base\getOptions
getOptions()
Definition
base.php:13
Bitrix\Socialnetwork\Livefeed\RenderParts\Base\getMetaResult
getMetaResult()
Definition
base.php:18
Bitrix\Socialnetwork\Livefeed\RenderParts\Department
Definition
department.php:12
Bitrix\Socialnetwork\Livefeed\RenderParts\Department\getData
getData($entityId=0)
Definition
department.php:13
Bitrix\Socialnetwork\Livefeed\RenderParts
Definition
base.php:2
modules
socialnetwork
lib
livefeed
renderparts
department.php
Создано системой
1.10.0