CCrmViewHelper::PrepareOrderShipmentStatusInfoExtraParams

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmViewHelper
  4. PrepareOrderShipmentStatusInfoExtraParams
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_view_helper.php
  • Класс: \CCrmViewHelper
  • Вызов: CCrmViewHelper::PrepareOrderShipmentStatusInfoExtraParams
static function PrepareOrderShipmentStatusInfoExtraParams(array &$infos)
{
	foreach($infos as $statusID => $status)
	{
		$semanticID = Bitrix\Crm\Order\DeliveryStatus::getSemanticId($status['STATUS_ID']);
		$infos[$statusID]['SEMANTICS'] = $semanticID;

		if(!isset($infos[$statusID]['COLOR']))
		{
			if($semanticID === Bitrix\Crm\PhaseSemantics::SUCCESS)
			{
				$infos[$statusID]['COLOR'] = \CCrmViewHelper::SUCCESS_COLOR;
			}
			elseif($semanticID === Bitrix\Crm\PhaseSemantics::FAILURE)
			{
				$infos[$statusID]['COLOR'] = \CCrmViewHelper::FAILURE_COLOR;
			}
			else
			{
				$infos[$statusID]['COLOR'] = \CCrmViewHelper::PROCESS_COLOR;
			}
		}
	}
}

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