本文整理汇总了PHP中CBlogPost::getSocnetPermsName方法的典型用法代码示例。如果您正苦于以下问题:PHP CBlogPost::getSocnetPermsName方法的具体用法?PHP CBlogPost::getSocnetPermsName怎么用?PHP CBlogPost::getSocnetPermsName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBlogPost
的用法示例。
在下文中一共展示了CBlogPost::getSocnetPermsName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDestinations
protected function getDestinations()
{
$isExtranetInstalled = Loader::includeModule("extranet");
$members = array();
if ($this->blogPostData["HAS_SOCNET_ALL"] != "Y") {
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
$perm = \CBlogPost::getSocnetPermsName($this->entityId);
foreach ($perm as $type => $v) {
foreach ($v as $vv) {
if ($type == "SG") {
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
if ($socNetGroup = \CSocNetGroup::getByID($vv["ENTITY_ID"])) {
$name = $socNetGroup["~NAME"];
$link = \CComponentEngine::makePathFromTemplate($this->getPathToGroup(), array("group_id" => $vv["ENTITY_ID"]));
$groupSiteID = false;
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
$queryGroupSite = \CSocNetGroup::getSite($vv["ENTITY_ID"]);
while ($groupSite = $queryGroupSite->fetch()) {
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
if (!$isExtranetInstalled || $groupSite["LID"] != \CExtranet::getExtranetSiteID()) {
$groupSiteID = $groupSite["LID"];
break;
}
}
if ($groupSiteID) {
/** @noinspection PhpDynamicAsStaticMethodCallInspection */
$tmp = \CSocNetLogTools::processPath(array("GROUP_URL" => $link), $this->getUser()->getId(), $groupSiteID);
// user_id is not important parameter
$link = strlen($tmp["URLS"]["GROUP_URL"]) > 0 ? $tmp["URLS"]["GROUP_URL"] : $link;
}
$isExtranet = is_array($GLOBALS["arExtranetGroupID"]) && in_array($vv["ENTITY_ID"], $GLOBALS["arExtranetGroupID"]);
$members[] = array("NAME" => $name, "LINK" => $link, 'AVATAR_SRC' => Ui\Avatar::getGroup($socNetGroup['IMAGE_ID']), "IS_EXTRANET" => $isExtranet ? "Y" : "N");
}
} elseif ($type == "U") {
if (in_array("US" . $vv["ENTITY_ID"], $vv["ENTITY"])) {
array_unshift($members, array("NAME" => Loc::getMessage('DISK_UF_BLOG_POST_CONNECTOR_MEMBERS_ALL'), "LINK" => null, 'AVATAR_SRC' => Ui\Avatar::getDefaultGroup(), "IS_EXTRANET" => "N"));
} else {
$name = \CUser::formatName('#NAME# #LAST_NAME#', array("NAME" => $vv["~U_NAME"], "LAST_NAME" => $vv["~U_LAST_NAME"], "SECOND_NAME" => $vv["~U_SECOND_NAME"], "LOGIN" => $vv["~U_LOGIN"], "NAME_LIST_FORMATTED" => ""), false);
$isExtranet = is_array($GLOBALS["arExtranetUserID"]) && in_array($vv["ENTITY_ID"], $GLOBALS["arExtranetUserID"]);
$members[] = array("NAME" => $name, "LINK" => \CComponentEngine::makePathFromTemplate($this->getPathToUser(), array("user_id" => $vv["ENTITY_ID"])), 'AVATAR_SRC' => Ui\Avatar::getPerson($vv['U_PERSONAL_PHOTO']), "IS_EXTRANET" => $isExtranet ? "Y" : "N");
}
} elseif ($type == "DR") {
$members[] = array("NAME" => $vv["EL_NAME"], "LINK" => null, 'AVATAR_SRC' => Ui\Avatar::getDefaultGroup(), "IS_EXTRANET" => "N");
}
}
}
} else {
$members[] = array("NAME" => Loc::getMessage('DISK_UF_BLOG_POST_CONNECTOR_MEMBERS_ALL'), "LINK" => null, 'AVATAR_SRC' => Ui\Avatar::getDefaultGroup(), "IS_EXTRANET" => "N");
}
return $members;
}