Skip to content

Commit

Permalink
lib: Add method `ActionController::prepareInit()'
Browse files Browse the repository at this point in the history
As it should not be required for controllers to call the parent's init() method, base controllers should use
prepareInit() in order to prepare the controller initialization.
  • Loading branch information
lippserd committed Sep 16, 2014
1 parent 8bf6642 commit f8edb4f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions library/Icinga/Web/Controller/ActionController.php
Expand Up @@ -91,9 +91,22 @@ public function __construct(
}

$this->view->tabs = new Tabs();
$this->prepareInit();
$this->init();
}

/**
* Prepare controller initialization
*
* As it should not be required for controllers to call the parent's init() method, base controllers should use
* prepareInit() in order to prepare the controller initialization.
*
* @see \Zend_Controller_Action()::init() For the controller initialization method.
*/
protected function prepareInit()
{
}

public function Config($file = null)
{
if ($file === null) {
Expand Down

0 comments on commit f8edb4f

Please sign in to comment.