• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Timeline/Item/Factory/HistoryItemStoreDocument.php
  • Класс: Bitrix\Crm\Service\Timeline\Item\Factory\HistoryItemStoreDocument
  • Вызов: HistoryItemStoreDocument::getStoreDocumentModificationItem
static function getStoreDocumentModificationItem(Context $context, Model $model): ?Item
{
	/** @var Item|null $className */
	$className = null;

	$field = $model->getHistoryItemModel()->get('FIELD');
	$error = $model->getHistoryItemModel()->get('ERROR');
	if ($field)
	{
		$className = self::getStoreDocumentModificationFieldClass(
			$field,
			$model->getAssociatedEntityModel()->get('DOC_TYPE')
		);
	}
	elseif ($error)
	{
		$className = self::getStoreDocumentModificationErrorClass($error);
	}

	if (!$className)
	{
		return null;
	}

	return new $className($context, $model);
}