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\BlockCode
protected function isInCart() {
return \Drupal::routeMatch()
->getRouteName() === 'commerce_cart.page';
}