From 04becc158254b4fad633b2d3a1d786ee44ec992a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 5 Jul 2017 06:19:12 +0200 Subject: [PATCH] TemplatechoicesController: less helper methods --- .../controllers/TemplatechoicesController.php | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/application/controllers/TemplatechoicesController.php b/application/controllers/TemplatechoicesController.php index 36384460..7c6248f4 100644 --- a/application/controllers/TemplatechoicesController.php +++ b/application/controllers/TemplatechoicesController.php @@ -31,26 +31,9 @@ class TemplatechoicesController extends ActionController protected function prepare($type, $title) { - $this->prepareTabs($type) - ->setAutorefreshInterval(10) - ->addTitle($title) - ->prepareActions($type); + $this->tabs(new ObjectsTabs($type, $this->Auth()))->activate('choices'); + $this->actions(new ChoicesActionBar($type, $this->url())); + $this->setAutorefreshInterval(10)->addTitle($title); 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; - } }