CCrmViewHelper::PrepareOrderShipmentStatuses

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmViewHelper
  4. PrepareOrderShipmentStatuses
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_view_helper.php
  • Класс: \CCrmViewHelper
  • Вызов: CCrmViewHelper::PrepareOrderShipmentStatuses
static function PrepareOrderShipmentStatuses()
{
	if(self::$ORDER_SHIPMENT_STATUSES !== null)
	{
		return self::$ORDER_SHIPMENT_STATUSES;
	}

	self::$ORDER_SHIPMENT_STATUSES = \Bitrix\Crm\Order\DeliveryStatus::getListInCrmFormat();

	$scheme = Bitrix\Crm\Color\OrderShipmentStatusColorScheme::getCurrent();
	foreach(self::$ORDER_SHIPMENT_STATUSES as $ID => &$item)
	{
		$element = $scheme->getElementByName($ID);
		if($element !== null && !isset($item['COLOR']))
		{
			$item['COLOR'] = $element->getColor();
		}
	}
	unset($item);
	return self::$ORDER_SHIPMENT_STATUSES;
}

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