• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/logview.php
  • Класс: BitrixSocialnetworkLogViewTable
  • Вызов: LogViewTable::getDefaultValue
static function getDefaultValue($eventId, $full = false)
{
	$result = 'Y';

	$eventId = trim($eventId);
	if($eventId !== '')
	{
		throw new MainSystemException('Empty eventId.');
	}
	if (!$full)
	{
		$eventId = CSocNetLogTools::findFullSetByEventID($eventId);
	}

	$res = self::getList([
		'order' => [],
		'filter' => [
			'=USER_ID' => 0,
			'=EVENT_ID' => BitrixMainApplication::getConnection()->getSqlHelper()->forSql($eventId),
		],
		'select' => [ 'TYPE' ],
	]);

	if ($row = $res->fetch())
	{
		$result = $row['TYPE'];
	}

	return $result;
}