Skip to content

Commit

Permalink
[TASK] Switch from property access to getters in TemplatePaths
Browse files Browse the repository at this point in the history
This allows overrides of the class to manipulate values in additional cases.
  • Loading branch information
NamelessCoder committed Mar 14, 2015
1 parent 5d5e439 commit e607c7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/View/TemplatePaths.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function setPartialRootPaths(array $partialRootPaths) {
*/
public function resolveTemplateFileForControllerAndActionAndFormat($controller, $action, $format = self::DEFAULT_FORMAT) {
$action = ucfirst($action);
foreach ($this->templateRootPaths as $templateRootPath) {
foreach ($this->getTemplateRootPaths() as $templateRootPath) {
$candidate = $templateRootPath . $controller . '/' . $action . '.' . $format;
$candidate = $this->ensureAbsolutePath($candidate);
if (TRUE === file_exists($candidate)) {
Expand Down Expand Up @@ -183,15 +183,15 @@ public function resolveAvailableTemplateFiles($controllerName, $format = self::D
* @return array
*/
public function resolveAvailablePartialFiles($format = self::DEFAULT_FORMAT) {
return $this->resolveFilesInFolders($this->partialRootPaths, $format);
return $this->resolveFilesInFolders($this->getPartialRootPaths(), $format);
}

/**
* @param string $format
* @return array
*/
public function resolveAvailableLayoutFiles($format = self::DEFAULT_FORMAT) {
return $this->resolveFilesInFolders($this->layoutRootPaths, $format);
return $this->resolveFilesInFolders($this->getLayoutRootPaths(), $format);
}

/**
Expand Down

0 comments on commit e607c7d

Please sign in to comment.