• Модуль: salescenter
  • Путь к файлу: ~/bitrix/modules/salescenter/lib/integration/landingmanager.php
  • Класс: BitrixSalesCenterIntegrationLandingManager
  • Вызов: LandingManager::createWebFormPages
protected function createWebFormPages($isSkipFirstForm = true)
{
	$result = new Result();
	if(!$this->isSiteExists())
	{
		return $result->addError(new Error('Site it not found'));
	}

	$forms = CrmManager::getInstance()->getWebForms();
	if(empty($forms))
	{
		return $result;
	}
	if($isSkipFirstForm)
	{
		$form = array_shift($forms);
		$result = $this->updateFirstWebFormPage($form['ID']);
	}
	if(empty($forms))
	{
		return $result;
	}

	foreach($forms as $form)
	{
		$formResult = $this->createWebFormLanding($form['ID']);
		if(!$formResult->isSuccess())
		{
			$result->addErrors($formResult->getErrors());
		}
	}

	return $result;
}