• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/manager.php
  • Класс: BitrixLandingManager
  • Вызов: Manager::getPublicationPath
static function getPublicationPath($siteCode = null, $siteId = null, $createPubPath = false)
{
	$tyePublicationPath = SiteType::getPublicationPath();

	$basePath = $tyePublicationPath;
	if ($basePath === null)
	{
		$basePath = self::getOption(
			'pub_path_' . (!isset($siteId) ? (self::getMainSiteId()) : $siteId),
			self::getPublicationPathConst()
		);
	}
	$subDir = self::getSmnSiteDir($siteId);
	if ($siteCode === null)
	{
		if (
			$createPubPath &&
			ModuleManager::isModuleInstalled('bitrix24')
		)
		{
			$createPubPath = false;
		}
		if ($createPubPath && $siteId)
		{
			self::createPublicationPath(
				$basePath,
				$siteId
			);
		}
		return $subDir . $basePath;
	}
	else
	{
		return $subDir . str_replace(
			'#id#',
			$siteCode,
			$basePath . '#id#/'
		);
	}
}