TotalsProcessor.php 724 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Checkout\Block\Checkout;
  7. use Magento\Checkout\Model\Layout\AbstractTotalsProcessor;
  8. class TotalsProcessor extends AbstractTotalsProcessor implements LayoutProcessorInterface
  9. {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. public function process($jsLayout)
  14. {
  15. $totals = $jsLayout['components']['checkout']['children']['sidebar']['children']['summary']
  16. ['children']['totals']['children'];
  17. $jsLayout['components']['checkout']['children']['sidebar']['children']['summary']
  18. ['children']['totals']['children'] = $this->sortTotals($totals);
  19. return $jsLayout;
  20. }
  21. }