diff --git a/library/Icinga/Web/Widget/Tab.php b/library/Icinga/Web/Widget/Tab.php
index 16ed0e7a8..817fe39ce 100644
--- a/library/Icinga/Web/Widget/Tab.php
+++ b/library/Icinga/Web/Widget/Tab.php
@@ -96,6 +96,13 @@ class Tab implements Widget
*/
private $iconCls = null;
+ /**
+ * Additional a tag attributes
+ *
+ * @var array
+ */
+ private $tagParams;
+
/**
* Sets an icon image for this tab
*
@@ -166,6 +173,16 @@ class Tab implements Widget
$this->urlParams = $urlParams;
}
+ /**
+ * Set additional a tag attributes
+ *
+ * @param array $tagParams
+ */
+ public function setTagParams(array $tagParams)
+ {
+ $this->tagParams = $tagParams;
+ }
+
/**
* Create a new Tab with the given properties
*
@@ -215,7 +232,13 @@ class Tab implements Widget
}
if ($this->url !== null) {
$this->url->overwriteParams($this->urlParams);
- $tab = '' . $caption . '';
+ $tagParams = '';
+ if ($this->tagParams !== null) {
+ foreach ($this->tagParams as $key => $value) {
+ $tagParams .= ' ' . $key . '="' . $value . '"';
+ }
+ }
+ $tab = '' . $caption . '';
} else {
$tab = $caption;
}