[FOLLOWUP] Add templateRootPaths support to StandaloneView 53/39253/2
authorFrans Saris <franssaris@gmail.com>
Mon, 4 May 2015 07:38:13 +0000 (09:38 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 4 May 2015 09:12:40 +0000 (11:12 +0200)
Removed the partly implemented $throwException parameter.

Resolves: #66709
Releases: master
Change-Id: I6624bf41a425b4ccb0bd38daeaf0222c58082c4a
Reviewed-on: http://review.typo3.org/39253
Reviewed-by: Cedric Ziel <cedric@cedric-ziel.com>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/fluid/Classes/View/StandaloneView.php

index d57ca42..9643bff 100644 (file)
@@ -191,11 +191,10 @@ class StandaloneView extends AbstractTemplateView {
         * All set templateRootPaths are checked to find template by given name
         *
         * @param string $templateName Name of the template
-        * @param bool $throwException
         * @throws InvalidTemplateResourceException
         * @api
         */
-       public function setTemplate($templateName, $throwException = TRUE) {
+       public function setTemplate($templateName) {
                if ($this->templateRootPaths === NULL) {
                        throw new InvalidTemplateResourceException('No template root path has been specified. Use setTemplateRootPaths().', 1430635895);
                }
@@ -210,7 +209,7 @@ class StandaloneView extends AbstractTemplateView {
                }
                if ($templatePathAndFilename !== NULL) {
                        $this->setTemplatePathAndFilename($templatePathAndFilename);
-               } elseif ($throwException) {
+               } else {
                        throw new InvalidTemplateResourceException('Could not load template file. Tried following paths: "' . implode('", "', $possibleTemplatePaths) . '".', 1430635896);
                }
        }