Connection::createEntity

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

	$result = DavConnectionTable::add($data);
	if ($result->isSuccess())
	{
		return $entity->setId($result->getId());
	}

	throw new CoreBaseBaseException('Error of create Dav connection', 400);
}

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