SectionConnection::patch

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. SectionConnection
  4. patch
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/mappers/sectionconnection.php
  • Класс: BitrixCalendarCoreMappersSectionConnection
  • Вызов: SectionConnection::patch
public function patch(
	SyncConnectionSectionConnection $sectionConnection,
	array $fields
): SyncConnectionSectionConnection
{
	$sectionConnectionFields = $this->convertToArray($sectionConnection);

	$result = SectionConnectionTable::update(
		$sectionConnection->getId(),
		array_intersect_key($sectionConnectionFields, array_flip($fields))
	);

	if ($result->isSuccess())
	{
		return $sectionConnection;
	}

	throw new BaseException('Error of delete SectionConnection: '
		. implode('; ', $result->getErrorMessages()),
		400);
}

Добавить комментарий