1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
sonetgroup.php
См. документацию.
1<?php
2namespace Bitrix\Socialnetwork\Livefeed\RenderParts;
3
4use Bitrix\Main\Localization\Loc;
5use Bitrix\Main\Config\Option;
6
7Loc::loadMessages(__FILE__);
8
9final class SonetGroup extends Base
10{
11 public function getData($entityId = 0)
12 {
13 static $groupPath = null;
14
15 global $USER;
16
17 $result = $this->getMetaResult();
18 $options = $this->getOptions();
19
20 if ($fields = \CSocNetGroup::getByID($entityId))
21 {
22 $result['id'] = $entityId;
23 $result['name'] = (
24 isset($fields["~NAME"])
25 ? $fields["~NAME"]
26 : ''
27 );
28
29 if (
30 empty($options['skipLink'])
31 || !$options['skipLink']
32 )
33 {
34 if ($groupPath === null)
35 {
36 $groupPath = (
37 (!isset($options['mobile']) || !$options['mobile'])
38 && (!isset($options['im']) || !$options['im'])
39 ? Option::get('socialnetwork', 'workgroups_page', SITE_DIR.'company/workgroups/').'group/#group_id#/'
40 : ''
41 );
42 }
43
44 if (!empty($groupPath))
45 {
46 $extranet = (
47 isset($options['extranet'])
48 ? $options['extranet']
49 : false
50 );
51 $extranetSite = (
52 isset($options['extranetSite'])
53 ? $options['extranetSite']
54 : false
55 );
56
58 $groupPath,
59 array(
60 "group_id" => $fields["ID"]
61 )
62 );
63
64 $groupSiteID = false;
65
66 $res = \CSocNetGroup::getSite($fields["ID"]);
67 while ($groupSiteList = $res->fetch())
68 {
69 if (
70 !$groupSiteID
71 && (
72 !$extranet
73 || $groupSiteList["LID"] != $extranetSite
74 )
75 )
76 {
77 $groupSiteID = $groupSiteList["LID"];
78 }
79 }
80
81 if ($groupSiteID)
82 {
83 $tmp = \CSocNetLogTools::processPath(array("GROUP_URL" => $link), $USER->getId(), $groupSiteID);
84 $link = ($tmp["URLS"]["GROUP_URL"] <> '' ? $tmp["SERVER_NAME"].$tmp["URLS"]["GROUP_URL"] : $link);
85 }
86
87 $result['link'] = $link;
88 }
89 }
90 }
91
92 return $result;
93 }
94
95}
static makePathFromTemplate($template, $arParams=array())
Определения component_engine.php:355
if(!is_array($prop["VALUES"])) $tmp
Определения component_props.php:203
</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
global $USER
Определения csv_new_run.php:40
const SITE_DIR(!defined('LANG'))
Определения include.php:72
$entityId
Определения payment.php:4
return false
Определения prolog_main_admin.php:185
$fields
Определения yandex_run.php:501