'notification-list']; /** @var ResultSet */ protected $data; public function __construct(ResultSet $data) { parent::__construct($data); } protected function init() { $this->data = $this->getIterator($this->data); $this->setDetailUrl(Url::fromPath('icingadb/event')); } protected function getItemClass(): string { switch ($this->getViewMode()) { case 'minimal': return NotificationListItemMinimal::class; case 'detailed': return NotificationListItemDetailed::class; default: return NotificationListItem::class; } } protected function assemble() { $this->addAttributes(['class' => $this->getViewMode()]); parent::assemble(); } }