• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Field/StageSemanticId.php
  • Класс: Bitrix\Crm\Field\StageSemanticId
  • Вызов: StageSemanticId::processLogic
protected function processLogic(Item $item, Context $context = null): Result
{
	$factory = Container::getInstance()->getFactory($item->getEntityTypeId());
	if ($factory && $factory->isStagesSupported())
	{
		$stage = $factory->getStage($item->getStageId());
		if ($stage)
		{
			$semantics = $stage->getSemantics();
			if (!PhaseSemantics::isDefined($semantics))
			{
				$semantics = PhaseSemantics::PROCESS;
			}

			$item->set($this->getName(), $semantics);
		}
	}

	return new Result();
}