ipl\Controls: allow to prepend tabs
This commit is contained in:
parent
e1d766f112
commit
0e45c74a0c
|
@ -81,6 +81,25 @@ class Controls extends Container
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Tabs $tabs
|
||||
* @return $this
|
||||
*/
|
||||
public function prependTabs(Tabs $tabs)
|
||||
{
|
||||
if ($this->tabs === null) {
|
||||
$this->tabs = $tabs;
|
||||
} else {
|
||||
$current = $this->tabs->getTabs();
|
||||
$this->tabs = $tabs;
|
||||
foreach ($current as $name => $tab) {
|
||||
$this->tabs->add($name, $tab);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Html
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue