Skip to content

Commit 6f501c5

Browse files
author
Bernhard Schmitt
committed
4622 - make OutOfBandRenderingCapable more strict for render()
1 parent 1e49246 commit 6f501c5

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

Classes/Domain/Model/Feedback/Operations/ReloadContentOutOfBand.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,7 @@ protected function renderContent(ControllerContext $controllerContext): string|R
147147
$view->assign('value', $this->node);
148148
$view->setRenderingEntryPoint($this->nodeDomAddress->getFusionPathForContentRendering());
149149

150-
$result = $view->render();
151-
152-
return (is_string($result) || $result instanceof ResponseInterface)
153-
? $result
154-
: '';
150+
return $view->render();
155151
}
156152
}
157153

Classes/Domain/Model/Feedback/Operations/RenderContentOutOfBand.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,7 @@ protected function renderContent(ControllerContext $controllerContext): string|R
196196
$view->assign('value', $parentNode);
197197
$view->setRenderingEntryPoint($parentDomAddress->getFusionPath());
198198

199-
$result = $view->render();
200-
201-
return (is_string($result) || $result instanceof ResponseInterface)
202-
? $result
203-
: '';
199+
return $view->render();
204200
}
205201
}
206202

Classes/View/OutOfBandRenderingCapable.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
namespace Neos\Neos\Ui\View;
1616

17+
use Psr\Http\Message\ResponseInterface;
18+
1719
/**
1820
* The interface for views capable of out-of-band rendering by accepting string serialized entry points
1921
*/
@@ -23,4 +25,6 @@ interface OutOfBandRenderingCapable
2325
* Set the rendering entry point, e.g. a Fusion path to use for rendering
2426
*/
2527
public function setRenderingEntryPoint(string $renderingEntryPoint): void;
28+
29+
public function render(): string|ResponseInterface;
2630
}

0 commit comments

Comments
 (0)