private static function createErrorMessage($deliveryExecution, $action)
    {
        if ($deliveryExecution->getState()->getUri() === DeliveryExecution::STATE_FINISHED) {
            $errorMsg = __('%s could not be %s because it is finished. Please refresh your data.', $deliveryExecution->getLabel(), $action);
        } else if ($deliveryExecution->getState()->getUri() === DeliveryExecution::STATE_TERMINATED) {
            $errorMsg = __('%s could not be %s because it is terminated. Please refresh your data.', $deliveryExecution->getLabel(), $action);
        } else {
            $errorMsg = __('%s could not be %s.', $deliveryExecution->getLabel(), $action);
        }

        return $errorMsg;
    }
private static function createErrorMessage($deliveryExecution, $action)
    {
        if ($deliveryExecution->getState()->getUri() === DeliveryExecution::STATE_FINISHED) {
            $errorMsg = __('%s could not be %s because it is finished. Please refresh your data.', $deliveryExecution->getLabel(), $action);
        } else if ($deliveryExecution->getState()->getUri() === DeliveryExecution::STATE_TERMINATED) {
            $errorMsg = __('%s could not be %s because it is terminated. Please refresh your data.', $deliveryExecution->getLabel(), $action);
        } else {
            $errorMsg = __('%s could not be %s.', $deliveryExecution->getLabel(), $action);
        }

        return $errorMsg;
    }
private static function createErrorMessage ( $ deliveryExecution , $ action ) { if ( $ deliveryExecution -> getState ( ) -> getUri ( ) === DeliveryExecution :: STATE_FINISHED ) { $ errorMsg = __ ( '%s could not be %s because it is finished. Please refresh your data.' , $ deliveryExecution -> getLabel ( ) , $ action ) ; } else if ( $ deliveryExecution -> getState ( ) -> getUri ( ) === DeliveryExecution :: STATE_TERMINATED ) { $ errorMsg = __ ( '%s could not be %s because it is terminated. Please refresh your data.' , $ deliveryExecution -> getLabel ( ) , $ action ) ; } else { $ errorMsg = __ ( '%s could not be %s.' , $ deliveryExecution -> getLabel ( ) , $ action ) ; } return $ errorMsg ; }
Creates a standard error message with different actions
@param {DeliveryExecution} $deliveryExecution
@param {String} $action
@return string
Creates a standard error message with different actions