From c0541e3aa2c7c16d7e7a2bf79b41f55c6781e001 Mon Sep 17 00:00:00 2001 From: Franck Allimant Date: Thu, 3 Jul 2014 16:25:50 +0200 Subject: [PATCH] Added getTemplateDirectories method to ParserInterface --- .../Thelia/Config/Resources/smarty-plugin.xml | 1 + .../Thelia/Core/Template/ParserInterface.php | 18 ++++++++++++++---- .../Core/Template/Smarty/SmartyParser.php | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/core/lib/Thelia/Config/Resources/smarty-plugin.xml b/core/lib/Thelia/Config/Resources/smarty-plugin.xml index 222874903..ba6754bbb 100644 --- a/core/lib/Thelia/Config/Resources/smarty-plugin.xml +++ b/core/lib/Thelia/Config/Resources/smarty-plugin.xml @@ -52,6 +52,7 @@ + %thelia.parser.forms% diff --git a/core/lib/Thelia/Core/Template/ParserInterface.php b/core/lib/Thelia/Core/Template/ParserInterface.php index 0c32bd4ef..4eff151e4 100644 --- a/core/lib/Thelia/Core/Template/ParserInterface.php +++ b/core/lib/Thelia/Core/Template/ParserInterface.php @@ -35,22 +35,32 @@ interface ParserInterface */ public function setTemplateDefinition(TemplateDefinition $templateDefinition); + /** + * Get template definition + * + * @param bool $webAssetTemplate Allow to load asset from another template + * If the name of the template if provided + * + * @return TemplateDefinition + */ + public function getTemplateDefinition($webAssetTemplate = false); + /** * Add a template directory to the current template list * - * @param unknown $templateType the template type ( + * @param int $templateType the template type ( * * @param string $templateName the template name * @param string $templateDirectory path to the template dirtectory - * @param unknown $key ??? - * @param string $unshift ??? Etienne ? + * @param string $key ??? + * @param bool $unshift ??? Etienne ? */ public function addTemplateDirectory($templateType, $templateName, $templateDirectory, $key, $unshift = false); /** * Return the registeted template directories for a givent template type * - * @param unknown $templateType + * @param int $templateType * @throws \InvalidArgumentException if the templateType is not defined * @return array: an array of defined templates directories for the given template type */ diff --git a/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php b/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php index 188ccfcce..65bf85566 100644 --- a/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php +++ b/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php @@ -211,7 +211,7 @@ class SmartyParser extends Smarty implements ParserInterface * @param int $templateType the template type (a TemplateDefinition type constant) * @param string $templateName the template name * @param string $templateDirectory path to the template dirtectory - * @param unknown $key ??? + * @param string $key ??? * @param boolean $unshift ??? Etienne ? */ public function addTemplateDirectory($templateType, $templateName, $templateDirectory, $key, $unshift = false)