ActionController: provide a singleTab helper
This commit is contained in:
parent
41c4448685
commit
732ebae339
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue