where('enabled', true) ->first(); if (self::$template) { self::$template->module_settings = json_decode(self::$template->module_settings); } self::$initialized = true; } return self::$template; } /** * Shortcut for getting template handler * * @return string * @throws \ErrorException */ public static function handler() { $template = self::get(); if (!$template) { throw new \ErrorException('No template selected, no handler available!'); } return $template->handler; } }