/** * (non-PHPDoc) * @see \Icinga\Web\Controller\ActionController For the method documentation. */ public function prepareInit() { parent::prepareInit(); if (Hook::has('ticket')) { $this->view->tickets = Hook::first('ticket'); } if (Hook::has('grapher')) { $this->view->grapher = Hook::first('grapher'); } }
public function testKnowsWhichHooksAreRegistered() { Hook::register('test', __FUNCTION__, $this->validHook); $this->assertTrue(Hook::has('test')); $this->assertFalse(Hook::has('no_such_hook')); }