Frontend\Core\Engine\Base\Widget::loadTemplate PHP Method

loadTemplate() protected method

Load the template
protected loadTemplate ( string $path = null )
$path string The path for the template to use.
    protected function loadTemplate($path = null)
    {
        // no template given, so we should build the path
        if ($path === null) {
            // build path to the module
            $frontendModulePath = FRONTEND_MODULES_PATH . '/' . $this->getModule();
            // build template path
            $path = $frontendModulePath . '/Layout/Widgets/' . $this->getAction() . '.html.twig';
        } else {
            // redefine
            $path = (string) $path;
        }
        // set template
        $this->setTemplatePath($path);
    }