Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CheckoutSummaryConfigProvider.php
Go to the documentation of this file.
1 <?php
8 
13 
18 {
22  private $urlBuilder;
23 
27  private $scopeConfig;
28 
33  public function __construct(
34  UrlInterface $urlBuilder,
35  ScopeConfigInterface $scopeConfig
36  ) {
37  $this->urlBuilder = $urlBuilder;
38  $this->scopeConfig = $scopeConfig;
39  }
40 
44  public function getConfig()
45  {
46  return [
47  'maxCartItemsToDisplay' => $this->getMaxCartItemsToDisplay(),
48  'cartUrl' => $this->urlBuilder->getUrl('checkout/cart')
49  ];
50  }
51 
58  private function getMaxCartItemsToDisplay()
59  {
60  return (int)$this->scopeConfig->getValue(
61  'checkout/options/max_items_display_count',
63  );
64  }
65 }
__construct(UrlInterface $urlBuilder, ScopeConfigInterface $scopeConfig)