public function getTemplateFilePath($templateName)
    {
        $templateList = array_merge(
            [ $this ],
            $this->getParentList()
        );

        /** @var TemplateDefinition $templateDefinition */
        foreach ($templateList as $templateDefinition) {
            $templateFilePath = sprintf(
                '%s%s/%s',
                THELIA_TEMPLATE_DIR,
                $templateDefinition->getPath(),
                $templateName
            );

            if (file_exists($templateFilePath)) {
                return $templateFilePath;
            }
        }

        throw new TemplateException("Template file not found: $templateName");
    }
public function getTemplateFilePath($templateName)
    {
        $templateList = array_merge(
            [ $this ],
            $this->getParentList()
        );

        /** @var TemplateDefinition $templateDefinition */
        foreach ($templateList as $templateDefinition) {
            $templateFilePath = sprintf(
                '%s%s/%s',
                THELIA_TEMPLATE_DIR,
                $templateDefinition->getPath(),
                $templateName
            );

            if (file_exists($templateFilePath)) {
                return $templateFilePath;
            }
        }

        throw new TemplateException("Template file not found: $templateName");
    }
public function getTemplateFilePath ( $ templateName ) { $ templateList = array_merge ( [ $ this ] , $ this -> getParentList ( ) ) ; /** @var TemplateDefinition $templateDefinition */ foreach ( $ templateList as $ templateDefinition ) { $ templateFilePath = sprintf ( '%s%s/%s' , THELIA_TEMPLATE_DIR , $ templateDefinition -> getPath ( ) , $ templateName ) ; if ( file_exists ( $ templateFilePath ) ) { return $ templateFilePath ; } } throw new TemplateException ( "Template file not found: $templateName" ) ; }
Find a template file path, considering the template parents, if any.

@param string $templateName the template name, with path
@return string
@throws TemplateException
Find a template file path considering the template parents if any .