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);
    }
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);
    }
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 ) ; }
Load an admin template

@param $template
@param null $module
@return null|Template

@throws \Exception
Load an admin template