• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/component/loglist/path.php
  • Класс: BitrixSocialnetworkComponentLogListPath
  • Вызов: Path::preparePathParams
public function preparePathParams(&$componentParams): array
{
	$result = [];

	$extranetSite = $this->getComponent()->getExtranetSiteValue();

	$result['folderUsers'] = Option::get('socialnetwork', 'user_page', false, SITE_ID);
	$result['folderUsers'] = ($result['folderUsers'] ?: ($extranetSite ? SITE_DIR.'contacts/personal/' : SITE_DIR.'company/personal/'));

	$result['folderWorkgroups'] = Option::get('socialnetwork', 'workgroups_page', false, SITE_ID);
	$result['folderWorkgroups'] = ($result['folderWorkgroups'] ?: SITE_DIR.'workgroups/');

	$result['pathToUserBlogPost'] = BitrixSocialnetworkHelperPath::get('userblogpost_page');
	$result['pathToUserBlogPost'] = ($result['pathToUserBlogPost'] ?: $result['folderUsers'].'user/#user_id#/blog/#post_id#/');

	$result['pathToLogEntry'] = Option::get('socialnetwork', 'log_entry_page', false, SITE_ID);
	$result['pathToLogEntry'] = ($result['pathToLogEntry'] ?: $result['folderUsers'].'personal/log/#log_id#/');

	$result['pathToMessagesChat'] = Option::get('main', 'TOOLTIP_PATH_TO_MESSAGES_CHAT', false, SITE_ID);
	$result['pathToMessagesChat']  = ($result['pathToMessagesChat'] ?: $result['folderUsers'].'messages/chat/#user_id#/');

	$result['pathToVideoCall'] = Option::get('main', 'TOOLTIP_PATH_TO_VIDEO_CALL', false, SITE_ID);
	$result['pathToVideoCall'] = ($result['pathToVideoCall'] ?: $result['folderUsers'].'video/#user_id#/');

	$result['pathToSmile'] = Option::get('socialnetwork', 'smile_page', false, SITE_ID);
	$result['pathToSmile'] = ($result['pathToSmile'] ?: '/bitrix/images/socialnetwork/smile/');

	$pathToUser = Option::get('main', 'TOOLTIP_PATH_TO_USER', false, SITE_ID);
	$pathToUser = ($pathToUser ?: $result['folderUsers'].'user/#user_id#/');

	Util::checkEmptyParamString($componentParams, 'PATH_TO_USER', $pathToUser);
	Util::checkEmptyParamString($componentParams, 'PATH_TO_USER_MICROBLOG', $result['folderUsers'].'user/#user_id#/blog/');
	Util::checkEmptyParamString($componentParams, 'PATH_TO_USER_BLOG_POST', $result['pathToUserBlogPost']);
	Util::checkEmptyParamString($componentParams, 'PATH_TO_USER_BLOG_POST_EDIT', $result['folderUsers'].'user/#user_id#/blog/edit/#post_id#/');
	Util::checkEmptyParamString($componentParams, 'PATH_TO_USER_BLOG_POST_IMPORTANT', $result['folderUsers'].'user/#user_id#/blog/important/');
	Util::checkEmptyParamString($componentParams, 'PATH_TO_GROUP', $result['folderWorkgroups'].'group/#group_id#/');
	Util::checkEmptyParamString($componentParams, 'PATH_TO_GROUP_MICROBLOG', $result['folderWorkgroups'].'group/#group_id#/blog/');
	Util::checkEmptyParamString($componentParams, 'PATH_TO_GROUP_BLOG_POST', $result['folderWorkgroups'].'group/#group_id#/blog/#post_id#/');
	Util::checkEmptyParamString($componentParams, 'PATH_TO_LOG_ENTRY', $result['pathToLogEntry']);
	Util::checkEmptyParamString($componentParams, 'PATH_TO_MESSAGES_CHAT', $result['pathToMessagesChat']);
	Util::checkEmptyParamString($componentParams, 'PATH_TO_VIDEO_CALL', $result['pathToVideoCall']);
	Util::checkEmptyParamString($componentParams, 'PATH_TO_SMILE', $result['pathToSmile']);

	$componentParams['PATH_TO_USER_MICROBLOG_POST'] = $componentParams['PATH_TO_USER_BLOG_POST'];
	$componentParams['PATH_TO_GROUP_MICROBLOG_POST'] = $componentParams['PATH_TO_GROUP_BLOG_POST'];

	return $result;
}