• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/factories/sectionconnectionfactory.php
  • Класс: BitrixCalendarSyncFactoriesSectionConnectionFactory
  • Вызов: SectionConnectionFactory::getSectionConnection
public function getSectionConnection(array $params): ?SectionConnection
{
	$statement = SectionConnectionTable::query()->setSelect(['*']);
	if (!empty($params['filter']))
	{
		$statement->setFilter($params['filter']);
	}
	if ($link = $statement->fetchObject())
	{
		try {
			return $this->prepareLink(
				$link,
				$params['connectionObject'] ?? null,
				$params['sectionObject'] ?? null,
			);
		} catch (BaseException $e) {
		    return null;
		}
	}
	else
	{
		return null;
	}
}