You are here

protected function RefreshPageElementsHelper::getCartBlock in Commerce Ajax Add to Cart 8

Returns cart block.

Return value

\Drupal\Core\Block\BlockPluginInterface The cart block.

1 call to RefreshPageElementsHelper::getCartBlock()
RefreshPageElementsHelper::updateCart in src/RefreshPageElementsHelper.php
Updates content inside cart block.

File

src/RefreshPageElementsHelper.php, line 136

Class

RefreshPageElementsHelper
Provides methods that would help in refreshing certain page elements.

Namespace

Drupal\dc_ajax_add_cart

Code

protected function getCartBlock() {

  /** @var \Drupal\Core\Block\BlockPluginInterface $block */
  $block = $this->blockManager
    ->createInstance('commerce_cart', []);
  return $block;
}