BlogPost::getSocnetRights

  1. Bitrix24 API (v. 23.675.0)
  2. blog
  3. BlogPost
  4. getSocnetRights
  • Модуль: blog
  • Путь к файлу: ~/bitrix/modules/blog/lib/copy/implement/blogpost.php
  • Класс: BitrixBlogCopyImplementBlogPost
  • Вызов: BlogPost::getSocnetRights
private function getSocnetRights($blogPostId)
{
	$socnetRights = [];

	$prevSocnetRights = CBlogPost::getSocNetPerms($blogPostId, false);

	foreach ($prevSocnetRights as $entityPrefix => $entities)
	{
		foreach ($entities as $entityId => $rights)
		{
			if ($entityPrefix != "SG")
			{
				$socnetRights[$entityId] = $entityPrefix.$entityId;
			}
		}
	}

	if ($this->changedRights)
	{
		foreach ($this->changedRights as $entityPrefix => $entitiesRatio)
		{
			foreach ($entitiesRatio as $oldEntityId => $newEntityId)
			{
				$socnetRights[$newEntityId] = $entityPrefix.$newEntityId;
			}
		}
	}

	return ($socnetRights ? $socnetRights : []);
}

Добавить комментарий