• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/livefeed/blogpost.php
  • Класс: BitrixSocialnetworkLivefeedBlogPost
  • Вызов: BlogPost::getIdeaBlogId
protected function getIdeaBlogId(array $params = []): ?int
{
	static $resultCache = [];

	if (!ModuleManager::isModuleInstalled('idea'))
	{
		return null;
	}

	$siteId = ($params['siteId'] ?? SITE_ID);

	if (isset($resultCache[$siteId]))
	{
		return $resultCache[$siteId];
	}

	$resultCache[$siteId] = null;

	if ($blogFields = CBlog::getByUrl('idea_' . $siteId))
	{
		$resultCache[$siteId] = (int)$blogFields['ID'];
	}

	return $resultCache[$siteId];
}