SectionConnection::createEntity

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. SectionConnection
  4. createEntity
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/mappers/sectionconnection.php
  • Класс: BitrixCalendarCoreMappersSectionConnection
  • Вызов: SectionConnection::createEntity
protected function createEntity($entity, array $params = []): ?CoreBaseEntityInterface
{
	$data = $this->convertToArray($entity);

	$result = SectionConnectionTable::add($data);

	if ($result->isSuccess())
	{
		return $entity->setId($result->getId());
	}

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

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