Issue Feature Closed

#57446harmonize visibility of template/partial/layoutRootPath(s) getter/setter functions in /typo3/sysext/fluid/Classes/View/TemplateView.php

Georg Tiefenbrunn 03/31/14, 09:19 updated 10/02/18, 11:58

Description

I tried to add rendering of partials from other extensions to f:render viewHelper and run into some problems if non default partial root paths (e.g. EXT:my_ext/Resources/Private/Partials/News) are used. So I had to store the original partial root paths to be able to reset them after rendering the external partial.

I tried to use the new plural getter/setter methods introduced in Revision f122c4f5 (getPartialRootPaths() instead of getPartialRootPath()).

As function getPartialRootPaths() is protected I had to use ReflectionMethod to store/reset the partial root paths. It would be very convenient if it were a public getter. I couldnt’t figure out why getPartialRootPaths() and getLayoutRootPaths() are protectetd, while getTemplateRootPaths() is public. Imho this should be harmonized. As getTemplateRootPath(), getPartialRootPath() and getLayoutRootPath() are deprecated they should left protected. The new plural setter/getter function imho should all be public so we can use $this->viewHelperVariableContainer->getView()->getPartialRootPaths() inside viewHelpers.

Please have a look at /typo3/sysext/fluid/Classes/View/TemplateView.php:

protected function getTemplateRootPath() @deprecated since fluid 6.2
public function setTemplateRootPath()
*public* function getTemplateRootPaths()
public function setTemplateRootPaths()

protected function getPartialRootPath() @deprecated since fluid 6.2
public function setPartialRootPath()
*protected* function getPartialRootPaths() _-> should be changed to public_
public function setPartialRootPaths()

protected function getLayoutRootPath() @deprecated since fluid 6.2
public function setLayoutRootPath()
*protected* function getLayoutRootPaths() _-> should be changed to public_
public function setLayoutRootPaths()

Reviews 1