FormLanding::getEditUrl

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. FormLanding
  4. getEditUrl
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/landing/formlanding.php
  • Класс: Bitrix\Crm\Integration\Landing\FormLanding
  • Вызов: FormLanding::getEditUrl
public function getEditUrl($landingId)
{
	if (!$this->canUse())
	{
		return null;
	}

	if (empty(static::$landingSites))
	{
		$sites = WebForm\Internals\LandingTable::getList([
			'select' => [
				'SITE_ID' => 'LANDING.SITE_ID',
				'LANDING_ID',
			],
		]);

		foreach ($sites as $site)
		{
			static::$landingSites[$site['LANDING_ID']] = $site['SITE_ID'];
		}
	}

	$siteId = static::$landingSites[$landingId] ?? false;

	if (!$siteId)
	{
		$siteId = $this->getSiteId();
	}

	if (!$siteId)
	{
		$siteId = 0;
	}

	return "/sites/site/$siteId/view/$landingId/";
}

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