/** * @return SafeHtml|SafeHtml[] */ protected function _produceHtml() { $list = ObjectList::i(); $list->setStacked(true, false); foreach ($this->_items as $item) { $card = ObjectListCard::i(); $card->setTitle($item[0]); if ($item[1]) { $card->setColour($card::COLOUR_SKY); } $list->addCard($card); } return $list; }
/** * @group ListStyles */ public final function stackedList() { $result = []; $list = ObjectList::i(); $list->setStacked(true); $card = ObjectListCard::i(); $card->setTitle('Stacked Card'); $list->addCard($card); $list->addCard($card); $card = clone $card; $card->setColour(ObjectListCard::COLOUR_BLUE); $list->addCard($card); $result[] = $list; $result[] = LineBreak::create(); $list = ObjectList::i(); $list->setStacked(true, false); $card = ObjectListCard::i(); $card->setTitle('Stacked Card'); $list->addCard($card); $list->addCard($card); $card = clone $card; $card->setColour(ObjectListCard::COLOUR_INDIGO); $list->addCard($card); $result[] = $list; return $result; }