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

loadTemplate() protected method

Load the template
protected loadTemplate ( string $path = null, boolean $overwrite = false )
$path string The path for the template to use.
$overwrite boolean Should the template overwrite the default?
    protected function loadTemplate($path = null, $overwrite = false)
    {
        $overwrite = (bool) $overwrite;
        // no template given, so we should build the path
        if ($path === null) {
            $path = $this->getModule() . '/Layout/Templates/' . $this->getAction() . '.html.twig';
        } else {
            // redefine
            $path = (string) $path;
        }
        // set properties
        $this->setOverwrite($overwrite);
        $this->setTemplatePath($path);
    }