Mapper::delete

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. Mapper
  4. delete
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/mappers/mapper.php
  • Класс: BitrixCalendarCoreMappersMapper
  • Вызов: Mapper::delete
public function delete(
	CoreBaseEntityInterface $entity,
	array $params = ['softDelete' => true]
): ?CoreBaseEntityInterface
{
	$resultEntity = $this->deleteEntity($entity, $params);
	if ($resultEntity === null)
	{
		$this->getCacheMap()->remove($entity->getId());

		return null;
	}

	if (!empty($resultEntity->getId()))
	{
		$this->getCacheMap()->updateItem($resultEntity, $resultEntity->getId());

		return $resultEntity;
	}

	return null;
}

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