Tab: Use the title as caption if there is no label set yet

This commit is contained in:
Johannes Meyer 2015-03-11 10:21:06 +01:00
parent 4a5e6bfc7c
commit ba0154ab79
1 changed files with 5 additions and 1 deletions

View File

@ -140,6 +140,10 @@ class Tab extends AbstractWidget
*/
public function getLabel()
{
if (! $this->label) {
return $this->title;
}
return $this->label;
}
@ -238,7 +242,7 @@ class Tab extends AbstractWidget
$classes[] = 'active';
}
$caption = $view->escape($this->label);
$caption = $view->escape($this->getLabel());
$tagParams = $this->tagParams;
if ($this->title) {