53 \
Magento\Customer\CustomerData\JsLayoutDataProviderPoolInterface $jsLayoutDataProvider,
57 if (isset(
$data[
'jsLayout'])) {
58 $this->jsLayout = array_merge_recursive($jsLayoutDataProvider->getData(),
$data[
'jsLayout']);
59 unset(
$data[
'jsLayout']);
61 $this->jsLayout = $jsLayoutDataProvider->getData();
63 parent::__construct($context, $customerSession, $checkoutSession,
$data);
64 $this->_isScopePrivate =
false;
84 'minicartMaxItemsVisible' => $this->getMiniCartMaxItemsCount(),
85 'websiteId' => $this->_storeManager->getStore()->getWebsiteId(),
86 'maxItemsToDisplay' => $this->getMaxItemsToDisplay()
96 return $this->serializer->serialize($this->
getConfig());
104 return 'Magento_Catalog/product/image_with_borders';
115 return $this->
getUrl(
'checkout');
126 return $this->
getUrl(
'checkout/cart');
137 return $this->
getUrl(
'checkout/sidebar/updateItemQty', [
'_secure' => $this->
getRequest()->isSecure()]);
148 return $this->
getUrl(
'checkout/sidebar/removeItem', [
'_secure' => $this->
getRequest()->isSecure()]);
160 return (
bool)$this->_scopeConfig->getValue(
161 self::XML_PATH_CHECKOUT_SIDEBAR_DISPLAY,
162 ScopeInterface::SCOPE_STORE
173 if (empty($this->_totals)) {
174 $quote = $this->getCustomQuote() ? $this->getCustomQuote() : $this->
getQuote();
175 $this->_totals =
$quote->getTotals();
188 return $this->
getLayout()->getBlock(
'checkout.cart.minicart.totals')->toHtml();
199 return $this->_storeManager->getStore()->getBaseUrl();
207 private function getMiniCartMaxItemsCount()
209 return (
int)$this->_scopeConfig->getValue(
'checkout/sidebar/count', ScopeInterface::SCOPE_STORE);
218 private function getMaxItemsToDisplay()
220 return (
int)$this->_scopeConfig->getValue(
221 'checkout/sidebar/max_items_display_count',
222 ScopeInterface::SCOPE_STORE
getUrl($route='', $params=[])