• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/templateref.php
  • Класс: BitrixLandingTemplateRef
  • Вызов: TemplateRef::get
static function get($id, $type)
{
	static $staticData = array();
	$id = intval($id);

	if (!isset($staticData[$type . $id]))
	{
		$data = array();
		if ($id > 0)
		{
			$res = TemplateRefTable::getList(array(
				'select' => array(
					'AREA', 'LANDING_ID'
				),
				'filter' => array(
					'ENTITY_ID' => $id,
					'=ENTITY_TYPE' => $type
				)
			));
			while (($row = $res->fetch()))
			{
				$data[$row['AREA']] = $row['LANDING_ID'];
			}
		}

		$staticData[$type . $id] = $data;
	}

	return $staticData[$type . $id];
}