From a0901c4b7f2db488cb4fb3be2dd921a0308f4659 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:36:40 +0200 Subject: Adding upstream version 1.0.2. Signed-off-by: Daniel Baumann --- library/Icingadb/Common/BaseOrderedItemList.php | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 library/Icingadb/Common/BaseOrderedItemList.php (limited to 'library/Icingadb/Common/BaseOrderedItemList.php') diff --git a/library/Icingadb/Common/BaseOrderedItemList.php b/library/Icingadb/Common/BaseOrderedItemList.php new file mode 100644 index 0000000..23ae7e9 --- /dev/null +++ b/library/Icingadb/Common/BaseOrderedItemList.php @@ -0,0 +1,34 @@ +getItemClass(); + + $i = 0; + foreach ($this->data as $data) { + $item = new $itemClass($data, $this); + $item->setOrder($i++); + + $this->add($item); + } + + if ($this->isEmpty()) { + $this->setTag('div'); + $this->add(new EmptyState(t('No items found.'))); + } + } +} -- cgit v1.2.3