urlBuilder = $urlBuilder; $this->scopeConfig = $scopeConfig; } /** * {@inheritdoc} */ public function getConfig() { return [ 'maxCartItemsToDisplay' => $this->getMaxCartItemsToDisplay(), 'cartUrl' => $this->urlBuilder->getUrl('checkout/cart') ]; } /** * Returns maximum cart items to display * This setting regulates how many items will be displayed in checkout summary block * * @return int */ private function getMaxCartItemsToDisplay() { return (int)$this->scopeConfig->getValue( 'checkout/options/max_items_display_count', ScopeInterface::SCOPE_STORE ); } }