You are here

protected function CartBlockBase::isInCart in Commerce Cart Blocks 8

2 calls to CartBlockBase::isInCart()
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 173

Class

CartBlockBase
CartBlockBase class.

Namespace

Drupal\commerce_cart_blocks\Plugin\Block

Code

protected function isInCart() {
  return \Drupal::routeMatch()
    ->getRouteName() === 'commerce_cart.page';
}