1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
department.php
См. документацию.
1<?php
2
3namespace Bitrix\Socialnetwork\Livefeed\RenderParts;
4
5use Bitrix\Main\Localization\Loc;
6use Bitrix\Main\Loader;
7use Bitrix\Socialnetwork\Helper\Path;
8
9Loc::loadMessages(__FILE__);
10
11final 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 {
47 $departmentPath,
48 array(
49 "ID" => $entityId
50 )
51 );
52 }
53 }
54 }
55
56 return $result;
57 }
58}
static makePathFromTemplate($template, $arParams=array())
Определения component_engine.php:355
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$result
Определения get_property_values.php:14
$entityId
Определения payment.php:4