protected function CartBlockBase::getCountText in Commerce Cart Blocks 8
Gets the text representation of the count of items.
2 calls to CartBlockBase::getCountText()
- CartBlock::buildHeading in src/
Plugin/ Block/ CartBlock.php - CartButtonBlock::getButtonLabel in src/
Plugin/ Block/ CartButtonBlock.php - Gets the text representation of the count of items.
File
- src/
Plugin/ Block/ CartBlockBase.php, line 216
Class
- CartBlockBase
- CartBlockBase class.
Namespace
Drupal\commerce_cart_blocks\Plugin\BlockCode
protected function getCountText() {
if (!$this
->getCartCount()) {
return $this->configuration['count_text_empty'];
}
return $this
->formatPlural($this
->getCartCount(), $this->configuration['count_text_singular'], $this->configuration['count_text_plural']);
}