public static function getAdminTemplate($template, $module = null)
    {
        $rtn = null;

        $path = static::getPath($template, $module);

        if (!is_null($path)) {
            $templateSrc = file_get_contents($path . $template . '.html');
            $rtn = new static($templateSrc);
            Event::trigger('AdminTemplateLoaded', $rtn);

            if (!is_null($rtn)) {
                $rtn->addFunction('hash', function ($args) {
                    return md5($args['value']);
                });
            }

            return $rtn;
        }

        throw new \Exception('Template does not exist: ' . $template);
    }