Returns the shipment state label.

@param string|ShipmentInterface $stateOrShipment
@return string
943
public function getShipmentStateLabel($stateOrShipment)
    {
        $state = $stateOrShipment instanceof ShipmentInterface ? $stateOrShipment->getState() : $stateOrShipment;

        return $this->translator->trans(ShipmentStates::getLabel($state));
    }
385730
public function getStateLabel()
    {
        $list = self::getStateList();

        return isset($list[$this->getState()]) ? $list[$this->getState()] : null;
    }
224311
public function getAction($state)
    {
        $type = self::getType('strtolower', false);
        $action = self::$defaultAction[$type];

        if (isset($this->states['action'])) {
            $action = $this->states['action'];
        }

        return ($state === 'uninstalled') ? '' : $action;
    }
810184
public String getLabel(CmsObject cms, String key) {

        CmsMessages messages = Messages.get().getBundle(getLocale(cms));
        return messages.key(key);
    }
1300950
public function getPaymentState($orderIndex = 0)
    {
        $paymentAmountInfo = $this->getPaymentAmountInfo($orderIndex);
        return array_key_exists('paymentState', $paymentAmountInfo) ? $paymentAmountInfo['paymentState'] : null;
    }
217046
public function checkState($storeState, $state = null)
	{
		if(null === $state)
		{
			if(null === $this->state)
			{
				if(isset($_GET['state']))
				{
					$state = $_GET['state'];
				}
				else
				{
					$state = '';
				}
			}
			else
			{
				$state = $this->state;
			}
		}
		return $storeState === $state;
	}
703273
private function createShipmentClass_v2($shipmentNumber = null) {
		$shipmentOrders = $this->getShipmentOrders();

		$this->checkRequestCount($shipmentOrders, 'createShipmentClass');

		$data = new StdClass;
		$data->Version = $this->getVersionClass();

		if($shipmentNumber !== null)
			$data->shipmentNumber = (string) $shipmentNumber;

		foreach($shipmentOrders as $key => &$shipmentOrder) {
			/**
			 * @var ShipmentOrder $shipmentOrder
			 */
			// Set global response-type if none is defined in shipment
			if($shipmentOrder->getLabelResponseType() === null && $this->getLabelResponseType() !== null)
				$shipmentOrder->setLabelResponseType($this->getLabelResponseType());

			$data->ShipmentOrder[$key] = $shipmentOrder->getShipmentOrderClass_v2();
		}

		return $data;
	}
1090103
private function getExportDocClass_v1($shipmentNumbers) {
		trigger_error('[DHL-PHP-SDK]: Version 1 Methods are deprecated and will removed soon (Called method ' . __METHOD__ . ')!', E_USER_DEPRECATED);
		trigger_error('[DHL-PHP-SDK]: Called Version 1 Method: ' . __METHOD__ . ' is incomplete (does nothing)!', E_USER_WARNING);

		$data = new StdClass;

		return $data;
	}
612710
public function getLabel()
    {
        if ($this->label)
            return $this->label;
        return $this->dataProvider->getLabel($this->name);
    }
269553
private function resolvePaymentsState(OrderInterface $order)
    {
        $capturedTotal = $authorizedTotal = $refundTotal = $failedTotal = 0;

        $payments = $order->getPayments();
        if (0 < $payments->count()) {
            // Gather state amounts
            foreach ($payments as $payment) {
                if ($payment->getState() == PaymentStates::STATE_CAPTURED) {
                    $capturedTotal += $payment->getAmount();
                } else if ($payment->getState() == PaymentStates::STATE_AUTHORIZED) {
                    $authorizedTotal += $payment->getAmount();
                } else if ($payment->getState() == PaymentStates::STATE_REFUNDED) {
                    $refundTotal += $payment->getAmount();
                } else if ($payment->getState() == PaymentStates::STATE_FAILED) {
                    $failedTotal += $payment->getAmount();
                }
            }

            // State by amounts
            if ($capturedTotal >= $order->getAtiTotal()) {
                return PaymentStates::STATE_CAPTURED;
            } elseif ($authorizedTotal + $capturedTotal >= $order->getAtiTotal()) {
                return PaymentStates::STATE_AUTHORIZED;
            } elseif ($refundTotal >= $order->getAtiTotal()) {
                return PaymentStates::STATE_REFUNDED;
            } elseif ($failedTotal >= $order->getAtiTotal()) {
                return PaymentStates::STATE_FAILED;
            }

            // Check for offline pending payment
            foreach ($payments as $payment) {
                if (in_array($payment->getState(), [PaymentStates::STATE_PENDING, PaymentStates::STATE_PENDING])
                    && $payment->getMethod()->getFactoryName() === 'offline') {
                    return PaymentStates::STATE_PENDING;
                }
            }
        }

        return PaymentStates::STATE_NEW;
    }
1022677
public function getOrderStateLabel($stateOrOrder)
    {
        $state = $stateOrOrder instanceof OrderInterface ? $stateOrOrder->getState() : $stateOrOrder;

        return $this->translator->trans(OrderStates::getLabel($state));
    }
580141
public function label()
    {
        if ($this->label_translated) {
            return cms_trans($this->label_translated);
        }

        if ($this->label) {
            return $this->label;
        }

        return ucfirst(str_replace('_', ' ', snake_case($this->source)));
    }
715125
public function getStatusLabelAttribute()
    {
        $labels = [
            Self::STATUS_RESERVED  => 'reserved',
            Self::STATUS_CONFIRMED => 'confirmed',
            Self::STATUS_CANCELED  => 'canceled',
            Self::STATUS_SERVED    => 'served',
            ];

        return array_key_exists($this->status, $labels)
            ? $labels[$this->status]
            : '';
    }
1052731
private function getOrderShipment(OrderInterface $order)
    {
        if ($order->getShipment()) {
            return $order->getShipment();
        }

        /** @var ShipmentInterface $shipment */
        $shipment = $this->shipmentFactory->createNew();
        $order->setShipment($shipment);
        $shipment->setMethod($this->defaultShippingMethodResolver->getDefaultShippingMethod($shipment));

        return $shipment;
    }
174156
public function track(StateInterface $state): int
    {
        $this->breadcrumbs->push($state->getName());
        $this->execution_counts[$state->getName()]++;
        return $this->execution_counts[$state->getName()];
    }
77507
private function getLabelClass_v2($shipmentNumbers) {
		$data = new StdClass;

		$data->Version = $this->getVersionClass();

		if(is_array($shipmentNumbers)) {
			$this->checkRequestCount($shipmentNumbers, 'getLabel');

			foreach($shipmentNumbers as $key => &$number)
				$data->shipmentNumber[$key] = $number;
		} else
			$data->shipmentNumber = $shipmentNumbers;

		if($this->getLabelResponseType() !== null)
			$data->labelResponseType = $this->getLabelResponseType();

		return $data;
	}
956896
public function getPaymentStateLabel($stateOrPayment)
    {
        $state = $stateOrPayment instanceof PaymentInterface ? $stateOrPayment->getState() : $stateOrPayment;

        return $this->translator->trans(PaymentStates::getLabel($state));
    }