Check whether order is cancelled.

$param boolean $strict
@return boolean
585
public function isCancelled( $strict = true ) {

		if( $strict ) {

			return $this->status == self::STATUS_CANCELLED;
		}

		return $this->status >= self::STATUS_CANCELLED;
	}
992376
public function endsWith($ends, bool $strict = false): bool
    {
        if (empty($ends)) {
            return false;
        }

        $parameters = $this->parameters($ends);

        foreach ($parameters as $needle) {
            $ending = $this->substring(strlen($this->string) - strlen($needle));
            if ($strict) {
                if (strcmp($ending, $needle->value()) === 0) {
                    return true;
                }
            } else {
                if (strcasecmp($ending, $needle->value()) === 0) {
                    return true;
                }
            }
        }

        return false;
    }
1267289
public function constrain($query, $model, $strict = false)
    {
        if ($model === '*') {
            return $this->constrainByWildcard($query);
        }

        $model = is_string($model) ? new $model : $model;

        $this->constrainByModel($query, $model, $strict);
    }
1009812
public function cancelOrder(int $orderId, bool $mapping = false)
    {
        $options = ['form_params' => ['id' => $orderId]];
        $response = $this->sendRequest(Api::POST, $this->getApiUrn(['order', 'delete']), $options);

        if ($mapping) {
            $response = $this->deserializeItem($response, Order::class);
        }

        return $response;
    }
490745
public function isNewItemAdded()
    {
        if ($this->_blNewITemAdded == null) {
            $this->_blNewITemAdded = (bool) \OxidEsales\Eshop\Core\Registry::getSession()->getVariable("blAddedNewItem");
            \OxidEsales\Eshop\Core\Registry::getSession()->deleteVariable("blAddedNewItem");
        }

        return $this->_blNewITemAdded;
    }
220480
public function checkByOrderId($orderId)
    {
        // Clear the error variable
        $this->error = '';

        /**
         * Check value is string
         * If string return false and set error message on error variable
         */
        if (
        !self::__validateString($orderId, 1, 50)
        )
            return false;

        $param = array(
            "apikey" => $this->apiKey,
            "mob" => $this->mobile,
            "id" => $orderId
        );

        return self::__sendCheckRequest('invoice/byorderid', $param);
    }
1280667
public static function check($s, $is_strict = true)
	{
		if (! ReflectionTypeHint::isValid()) return false;
		for ($i = 0, $len = strlen($s); $i < $len; $i++)
		{
			$c = ord($s[$i]);
			if ($c < 0x80) #1 byte  0bbbbbbb
			{
				if ($is_strict === false || ($c > 0x1F && $c < 0x7F) || $c == 0x09 || $c == 0x0A || $c == 0x0D) continue;
			}
			if (($c & 0xE0) == 0xC0) $n = 1; #2 bytes 110bbbbb 10bbbbbb
			elseif (($c & 0xF0) == 0xE0) $n = 2; #3 bytes 1110bbbb 10bbbbbb 10bbbbbb
			elseif (($c & 0xF8) == 0xF0) $n = 3; #4 bytes 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb
			elseif (($c & 0xFC) == 0xF8) $n = 4; #5 bytes 111110bb 10bbbbbb 10bbbbbb 10bbbbbb 10bbbbbb
			elseif (($c & 0xFE) == 0xFC) $n = 5; #6 bytes 1111110b 10bbbbbb 10bbbbbb 10bbbbbb 10bbbbbb 10bbbbbb
			else return false; #does not match any model
			#n bytes matching 10bbbbbb follow ?
			for ($j = 0; $j < $n; $j++)
			{
				$i++;
				if ($i == $len || ((ord($s[$i]) & 0xC0) != 0x80) ) return false;
			}
		}
		return true;
	}
475636
function is_cancelled(){
        $mform =& $this->_form;
        if ($mform->isSubmitted()){
            foreach ($mform->_cancelButtons as $cancelbutton){
                if (optional_param($cancelbutton, 0, PARAM_RAW)){
                    return true;
                }
            }
        }
        return false;
    }
1157803
public function isOneOf(array $allowedValues, bool $strict = false): bool
    {
        if (!is_array($this->value)) {
            return in_array($this->value, $allowedValues, $strict);
        }

        foreach ($this->value as $value) {
            if (!in_array($value, $allowedValues, $strict)) {
                return false;
            }
        }

        return true;
    }
947315
public static function getStatusBetween($from = null, $to = null, $strict = false, $strictTo = null)
    {
        $statusList = static::getStatusList();

        $strictFrom = $strict;
        $strictTo = isset($strictTo) ? (bool) $strictTo : $strict;

        // Remove status before given $from
        if (isset($from)) {
            static::checkAllowedStatus($from);
            foreach ($statusList as $key => $status) {
                if ($from !== $status) {
                    unset($statusList[$key]);
                } else {
                    if ($strictFrom) {
                        unset($statusList[$key]);
                    }
                    break;
                }
            }
        }

        // Remove status after given $to
        if (isset($to)) {
            static::checkAllowedStatus($to);
            // On inverse l'ordre des statuts
            $statusList = array_reverse($statusList);
            foreach ($statusList as $key => $status) {
                if ($to !== $status) {
                    unset($statusList[$key]);
                } else {
                    if ($strictTo) {
                        unset($statusList[$key]);
                    }
                    break;
                }
            }
            // On inverse l'ordre des statuts
            $statusList = array_reverse($statusList);
        }

        return array_values($statusList);
    }
1336979
public static function cancel($order_id, $params = null, $opts = null)
    {
        $url = static::instanceUrlWithId($order_id);
        if (empty($params)) {
            $params = ['status' => 'canceled'];
        } else {
            $params = array_merge($params, ['status' => 'canceled']);
        }
        return static::_directRequest('put', $url, $params, $opts);
    }
216456
public function isDiscarded()
    {
        $deleteAfter = strtotime(self::config()->get('delete_after'), strtotime($this->Created));
        return ($this->Status === 'CART') && (time() > $deleteAfter);
    }
1244523
public function isPrintable( $strict = true ) {

		if( $strict ) {

			return $this->status == self::STATUS_COMPLETED;
		}

		return in_array( $this->status, [ self::STATUS_PAID, self::STATUS_DELIVERED, self::STATUS_COMPLETED ] );
	}
905468
public static function hasValue($value, bool $strict = true): bool
    {
        $validValues = static::getValues();

        if ($strict) {
            return in_array($value, $validValues, true);
        }

        return in_array((string) $value, array_map('strval', $validValues), true);
    }
713150
public static function isGreaterThan($status1, $status2, $strict = true)
    {
        static::checkAllowedStatus($status1);
        static::checkAllowedStatus($status2);

        $entityStatusIdx = array_search($status1, static::getStatusList());
        $comparedStatusIdx = array_search($status2, static::getStatusList());

        if ($strict) {
            return $entityStatusIdx > $comparedStatusIdx;
        }

        return $entityStatusIdx >= $comparedStatusIdx;
    }
765623
public static function isValidValue($value, $strict = true) : bool
    {
        $values = array_values(self::getConstants());
        return in_array($value, $values, $strict);
    }
472673
public function compare($strict = false)
    {
        return CompareHelper::compare($this->compare1, $this->operator, $this->compare2, $strict);
    }