TemplatechoicesController: less helper methods
This commit is contained in:
parent
8b882411e5
commit
04becc1582
|
@ -31,26 +31,9 @@ class TemplatechoicesController extends ActionController
|
||||||
|
|
||||||
protected function prepare($type, $title)
|
protected function prepare($type, $title)
|
||||||
{
|
{
|
||||||
$this->prepareTabs($type)
|
$this->tabs(new ObjectsTabs($type, $this->Auth()))->activate('choices');
|
||||||
->setAutorefreshInterval(10)
|
$this->actions(new ChoicesActionBar($type, $this->url()));
|
||||||
->addTitle($title)
|
$this->setAutorefreshInterval(10)->addTitle($title);
|
||||||
->prepareActions($type);
|
|
||||||
ChoicesTable::create($type, $this->db())->renderTo($this);
|
ChoicesTable::create($type, $this->db())->renderTo($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function prepareTabs($type)
|
|
||||||
{
|
|
||||||
$this->tabs(
|
|
||||||
new ObjectsTabs($type, $this->Auth())
|
|
||||||
)->activate('choices');
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function prepareActions($type)
|
|
||||||
{
|
|
||||||
$this->actions(new ChoicesActionBar($type, $this->url()));
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue