• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Factory/Dynamic.php
  • Класс: Bitrix\Crm\Service\Factory\Dynamic
  • Вызов: Dynamic::getDeleteOperation
public function getDeleteOperation(Item $item, Context $context = null): Operation\Delete
{
	$operation = parent::getDeleteOperation($item, $context);

	$eventManager = Service\Container::getInstance()->getRestEventManager();

	return $operation
		->addAction(
			Operation::ACTION_AFTER_SAVE,
			new Action\SendEvent($eventManager::EVENT_DYNAMIC_ITEM_DELETE)
		)->addAction(
			Operation::ACTION_AFTER_SAVE,
			new Action\SendEvent($eventManager->getItemEventNameWithEntityTypeId(
				$eventManager::EVENT_DYNAMIC_ITEM_DELETE,
				$this->getEntityTypeId()
			))
		)
	;
}