public function __construct($templateFile)
{
$templateExt = '.twig';
if (substr($templateFile, -strlen($templateExt)) !== $templateExt) {
$templateFile .= $templateExt;
}
$this->template = $templateFile;
$this->initializeTwig();
$this->piwik_version = Version::VERSION;
$this->userLogin = Piwik::getCurrentUserLogin();
$this->isSuperUser = Access::getInstance()->hasSuperUserAccess();
try {
$this->piwikUrl = SettingsPiwik::getPiwikUrl();
} catch (Exception $ex) {
// pass (occurs when DB cannot be connected to, perhaps piwik URL cache should be stored in config file...)
}
}