CCrmEntityHelper::registerMarkEvent

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmEntityHelper
  4. registerMarkEvent
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/entity_helper.php
  • Класс: \CCrmEntityHelper
  • Вызов: CCrmEntityHelper::registerMarkEvent
static function registerMarkEvent(ItemIdentifier $itemIdentifier, array $params, ?int $authorId = null): void
{
	$fieldsInfo = static::extractArrayFromParams($params, 'fieldsInfo');

	if (!static::isStagesSupportedForEntity($fieldsInfo))
	{
		return;
	}

	$previousSemantics = (string)($params['previousStageSemantics'] ?? PhaseSemantics::UNDEFINED);
	$currentSemantics = (string)($params['currentStageSemantics'] ?? PhaseSemantics::UNDEFINED);

	if (
		$previousSemantics !== $currentSemantics
		&& PhaseSemantics::isFinal($currentSemantics)
	)
	{
		Timeline\MarkController::getInstance()->onItemMoveToFinalStage(
			$itemIdentifier,
			$currentSemantics,
			$authorId,
		);
	}
}

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