How is an order's cancellation implemented?

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Block/Adminhtml/Order/View.php#L108-L120


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order.php#L507-L514

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order.php#L516-L524

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order.php#L526-L546

See also: