ActionController: provide a singleTab helper

This commit is contained in:
Thomas Gelf 2016-10-13 19:06:15 +00:00
parent 41c4448685
commit 732ebae339
1 changed files with 11 additions and 0 deletions

View File

@ -90,6 +90,17 @@ abstract class ActionController extends Controller
$this->sendJson((object) array('error' => $message));
}
protected function singleTab($label)
{
return $this->view->tabs = Widget::create('tabs')->add(
'tab',
array(
'label' => $label,
'url' => $this->getRequest()->getUrl()
)
)->activate('tab');
}
protected function setConfigTabs()
{
$this->view->tabs = Widget::create('tabs')->add(