How is \Magento\Sales\Model\Order::canEdit() implemented and used?

Definition

135f967/app/code/Magento/Sales/Model/Order.php#L708-L741

/**
 * Retrieve order edit availability
 *
 * @return bool
 */
public function canEdit()
{
	if ($this->canUnhold()) {
		return false;
	}
	$state = $this->getState();
	if ($this->isCanceled() ||
		$this->isPaymentReview() ||
		$state === self::STATE_COMPLETE ||
		$state === self::STATE_CLOSED
	) {
		return false;
	}
	if ($this->hasInvoices()) {
		return false;
	}
	if (!$this->getPayment()->getMethodInstance()->canEdit()) {
		return false;
	}
	if ($this->getActionFlag(self::ACTION_FLAG_EDIT) === false) {
		return false;
	}
	return true;
}

Details: How is \Magento\Sales\Model\Order::isPaymentReview() implemented and used?

Usage

See also: