Section::deleteEntity

  1. Bitrix24 API (v. 23.675.0)
  2. calendar
  3. Section
  4. deleteEntity
  • Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/core/mappers/section.php
  • Класс: BitrixCalendarCoreMappersSection
  • Вызов: Section::deleteEntity
protected function deleteEntity(CoreBaseEntityInterface $entity, array $params = ['softDelete' => true]): ?CoreBaseEntityInterface
{
	if (!empty($params['softDelete']))
	{
		$entity->setIsActive(false);

		return $this->updateEntity($entity, $params);
	}

	// TODO: change it to SectionTable::delete() after implementation all logic
	if (CCalendarSect::Delete($entity->getId(), false, $params))
	{
		return null;
	}

	throw new CoreBaseBaseException('Error of delete section');
}

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