diff --git a/library/vendor/ipl/Web/Widget/NameValueTable.php b/library/vendor/ipl/Web/Widget/NameValueTable.php new file mode 100644 index 00000000..2891db8d --- /dev/null +++ b/library/vendor/ipl/Web/Widget/NameValueTable.php @@ -0,0 +1,29 @@ + 'name-value-table']; + + public function createNameValueRow($name, $value) + { + return $this::tr([$this::th($name), $this::td($value)]); + } + + public function addNameValueRow($name, $value) + { + return $this->body()->add($this->createNameValueRow($name, $value)); + } + + public function addNameValuePairs($pairs) + { + foreach ($pairs as $name => $value) { + $this->addNameValueRow($name, $value); + } + + return $this; + } +}