本文整理汇总了PHP中CSocNetLogTools::formatEvent_GetCreatedBy方法的典型用法代码示例。如果您正苦于以下问题:PHP CSocNetLogTools::formatEvent_GetCreatedBy方法的具体用法?PHP CSocNetLogTools::formatEvent_GetCreatedBy怎么用?PHP CSocNetLogTools::formatEvent_GetCreatedBy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSocNetLogTools
的用法示例。
在下文中一共展示了CSocNetLogTools::formatEvent_GetCreatedBy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: formatListsElement
public static function formatListsElement($fields, $params, $mail = false)
{
$element = array('EVENT' => $fields, 'CREATED_BY' => array(), 'ENTITY' => array(), 'EVENT_FORMATTED' => array());
$userObject = CUser::getByID($fields['ENTITY_ID']);
$user = $userObject->fetch();
if ($user) {
if (!$mail) {
global $APPLICATION;
$rights = array();
$rightsQuery = CSocNetLogRights::getList(array(), array('LOG_ID' => $fields['ID']));
while ($right = $rightsQuery->fetch()) {
$rights[] = $right['GROUP_CODE'];
}
if (defined('BX_COMP_MANAGED_CACHE')) {
$GLOBALS['CACHE_MANAGER']->registerTag('LISTS_ELEMENT_LIVE_FEED');
}
$componentResult = $APPLICATION->includeComponent('bitrix:bizproc.workflow.livefeed', '', array('WORKFLOW_ID' => $fields['MESSAGE']), null, array('HIDE_ICONS' => 'Y'));
$siteDir = rtrim(SITE_DIR, '/');
$url = CSocNetLogTools::formatEvent_GetURL($fields, true);
$url = str_replace('#SITE_DIR#', $siteDir, $url);
$url .= '' . $fields['ID'] . '/';
$element = array('EVENT' => $fields, 'EVENT_FORMATTED' => array('TITLE_24' => '<a href="' . $fields['TITLE_TEMPLATE'] . '" class="bx-lists-live-feed-title-link">' . $fields['TITLE'] . '</a>', 'MESSAGE' => $fields['TEXT_MESSAGE'] . $componentResult['MESSAGE'], 'IS_IMPORTANT' => false, 'STYLE' => 'new-employee', 'AVATAR_STYLE' => 'avatar-info', 'DESTINATION' => CSocNetLogTools::formatDestinationFromRights($rights, array_merge($params, array('CREATED_BY' => $fields['USER_ID']))), 'URL' => $url), 'CREATED_BY' => CSocNetLogTools::formatEvent_GetCreatedBy($fields, $params, $mail), 'AVATAR_SRC' => CSocNetLog::formatEvent_CreateAvatar($fields, $params), 'CACHED_JS_PATH' => $componentResult['CACHED_JS_PATH'], 'CACHED_CSS_PATH' => $componentResult['CACHED_CSS_PATH']);
if ($params['MOBILE'] == 'Y') {
$element['EVENT_FORMATTED']['TITLE_24'] = Loc::getMessage('LISTS_LF_MOBILE_DESTINATION');
$element['EVENT_FORMATTED']['TITLE_24_2'] = $fields['TITLE'];
}
if (CModule::IncludeModule('bizproc')) {
$workflowId = \CBPStateService::getWorkflowByIntegerId($element['EVENT']['SOURCE_ID']);
}
if ($workflowId) {
$element['EVENT']['SOURCE_ID'] = $workflowId;
}
}
return $element;
}
}