TemplatechoicesController: less helper methods

This commit is contained in:
Thomas Gelf 2017-07-05 06:19:12 +02:00
parent 8b882411e5
commit 04becc1582
1 changed files with 3 additions and 20 deletions

View File

@ -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;
}
} }