• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/timeline/commentcontroller.php
  • Класс: Bitrix\Crm\Timeline\CommentController
  • Вызов: CommentController::onModify
public function onModify($id, array $params = [])
{
	$id = (int)$id;
	if ($id <= 0)
	{
		throw new ArgumentException('ID must be greater than zero.', 'ID');
	}

	$ownerTypeId = (int)($params['ENTITY_TYPE_ID'] ?? 0);
	$ownerId = (int)($params['ENTITY_ID'] ?? 0);
	if ($ownerId <= 0 || !\CCrmOwnerType::IsDefined($ownerTypeId))
	{
		throw new ArgumentException('Owner ID and owner type ID must be greater than zero.', 'ID');
	}

	$this->onSave($id, $params);

	$this->sendPullEventOnUpdate(
		new ItemIdentifier($ownerTypeId, $ownerId),
		$id
	);
}