- Модуль: landing
- Путь к файлу: ~/bitrix/modules/landing/lib/internals/site.php
- Класс: BitrixLandingInternalsSiteTable
- Вызов: SiteTable::getValueByCode
static function getValueByCode($id, array $fields, $code)
{
static $data = [];
if (array_key_exists($id, $data))
{
return isset($data[$id][$code]) ? $data[$id][$code] : null;
}
if (array_key_exists($code, $fields))
{
return $fields[$code];
}
$res = self::getList([
'select' => [
'*',
'DOMAIN_NAME' => 'DOMAIN.DOMAIN',
'DOMAIN_PROVIDER' => 'DOMAIN.PROVIDER'
],
'filter' => [
'ID' => $id,
'CHECK_PERMISSIONS' => 'N',
'=DELETED' => ['Y', 'N']
]
]);
if ($row = $res->fetch())
{
$data[$id] = $row;
}
return isset($data[$id][$code]) ? $data[$id][$code] : null;
}