• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/copy/implement/landing.php
  • Класс: BitrixLandingCopyImplementLanding
  • Вызов: Landing::copyChildren
public function copyChildren(Container $container, $landingId, $copiedLandingId)
{
	$results = [];

	BitrixLandingLanding::setEditMode();

	$landingInstance = BitrixLandingLanding::createInstance($copiedLandingId);
	if ($landingInstance->exist())
	{
		$results[] = $this->copyBlocks($landingId, $copiedLandingId);

		Hook::setEditMode();
		Hook::copyLanding($landingId, $copiedLandingId);

		File::copyLandingFiles($landingId, $copiedLandingId);
		if (($refs = TemplateRef::getForLanding($landingId)))
		{
			TemplateRef::setForLanding($copiedLandingId, $refs);
		}
	}

	$landingErrorCollection = $landingInstance->getError();
	if ($landingErrorCollection->getErrors())
	{
		$result = new Result();
		$result->addErrors($landingErrorCollection->getErrors());
		$results[] = $result;
	}

	return $this->getResult($results);
}