/** * Set template paths, config vars, etc * @param string $routepath The prefix that should be added to all route paths. * @return void */ public function initialize($routepath) { $this->routepath = $routepath; Template::addPath(__DIR__ . '/templates/', 'CatLab/OpenIDClient/'); // Set session variable Application::getInstance()->on('dispatch:before', array($this, 'setRequestUser')); // Set the global user mapper, unless one is set already Application::getInstance()->on('dispatch:first', array($this, 'setUserMapper')); // Add helper methods $helper = new LoginForm($this); Template::addHelper('CatLab.OpenIDClient.LoginForm', $helper); }
/** * Set template paths, config vars, etc * @param string $routepath The prefix that should be added to all route paths. * @return void */ public function initialize($routepath) { // Set path $this->routepath = $routepath; // Add templates Template::addPath(__DIR__ . '/templates/', 'CatLab/Accounts/'); // Add locales Text::getInstance()->addPath('catlab.accounts', __DIR__ . '/locales/'); // Set session variable Application::getInstance()->on('dispatch:before', array($this, 'setRequestUser')); // Set the global user mapper, unless one is set already Application::getInstance()->on('dispatch:first', array($this, 'setUserMapper')); // Add helper methods $helper = new LoginForm($this); Template::addHelper('CatLab.Accounts.LoginForm', $helper); }