[icinga-checkins] icinga.org: icingaweb2-module-director/master: QuickTable: provide more hooks for special tables

git at icinga.org git at icinga.org
Mon Jan 2 10:16:06 CET 2017


Module: icingaweb2-module-director
Branch: master
Commit: a395923aed129e5b89a99f49ed515a432d1359c9
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=a395923aed129e5b89a99f49ed515a432d1359c9

Author: Thomas Gelf <thomas at gelf.net>
Date:   Fri Dec 30 21:10:29 2016 +0100

QuickTable: provide more hooks for special tables

---

 library/Director/Web/Table/QuickTable.php |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/library/Director/Web/Table/QuickTable.php b/library/Director/Web/Table/QuickTable.php
index d1f9b03..69c69ea 100644
--- a/library/Director/Web/Table/QuickTable.php
+++ b/library/Director/Web/Table/QuickTable.php
@@ -308,11 +308,26 @@ abstract class QuickTable implements Paginatable
              . $this->renderMultiselectAttributes()
              . '>' . "\n"
              . $this->renderTitles($this->getTitles())
-             . "<tbody>\n";
+             . $this->beginTableBody();
         foreach ($data as $row) {
             $htm .= $this->renderRow($row);
         }
-        return $htm . "</tbody>\n</table>\n";
+        return $htm . $this->endTableBody() . $this->endTable();
+    }
+
+    protected function beginTableBody()
+    {
+        return "<tbody>\n";
+    }
+
+    protected function endTableBody()
+    {
+        return "</tbody>\n";
+    }
+
+    protected function endTable()
+    {
+        return "</table>\n";
     }
 
     /**



More information about the icinga-checkins mailing list