• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/subtype/map.php
  • Класс: BitrixLandingSubtypeMap
  • Вызов: Map::readSettings
static function readSettings(array $hooks): void
{
	$readHook = static function (string $hook) use ($hooks)
	{
		$fields = $hooks[$hook]->getFields();
		if ($fields)
		{
			self::$settings[$hook] = [
				'USE' => isset($fields['USE']) && $fields['USE']->getValue() === 'Y',
				'CODE' => isset($fields['CODE']) ? $fields['CODE']->getValue() : '',
			];
		}
	};

	$readHook('GMAP');
	if (self::canUseYandex())
	{
		$readHook('YMAP');
	}
}