You are here

protected function CartBlockBase::shouldHide in Commerce Cart Blocks 8

2 calls to CartBlockBase::shouldHide()
CartBlock::build in src/Plugin/Block/CartBlock.php
Builds the cart block.
CartButtonBlock::build in src/Plugin/Block/CartButtonBlock.php
Builds the cart block.

File

src/Plugin/Block/CartBlockBase.php, line 331

Class

CartBlockBase
CartBlockBase class.

Namespace

Drupal\commerce_cart_blocks\Plugin\Block

Code

protected function shouldHide() {
  return $this->configuration['hide_if_empty'] && !$this
    ->getCartCount();
}