'status-bar']; public function __construct($summary) { $this->summary = $summary; } abstract protected function assembleTotal(BaseHtmlElement $total); abstract protected function createStateBadges(): BaseHtmlElement; protected function createCount(): BaseHtmlElement { $total = Html::tag('span', ['class' => 'item-count']); $this->assembleTotal($total); return $total; } protected function assemble() { $this->add([ $this->createCount(), $this->createStateBadges() ]); } }