File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -250,9 +250,7 @@ public function run(Application\Request $request): Application\IResponse
250250 }
251251
252252 // finish template rendering
253- if ($ this ->getTemplate ()) {
254- $ this ->sendTemplate ();
255- }
253+ $ this ->sendTemplate ();
256254
257255 } catch (Application \AbortException $ e ) {
258256 }
@@ -453,12 +451,11 @@ public function setLayout($layout)
453451
454452
455453 /**
456- * @throws Nette\Application\BadRequestException if no template found
457454 * @throws Nette\Application\AbortException
458455 */
459- public function sendTemplate (): void
456+ public function sendTemplate (ITemplate $ template = null ): void
460457 {
461- $ template = $ this ->getTemplate ();
458+ $ template = $ template ?: $ this ->getTemplate ();
462459 if (!$ template ->getFile ()) {
463460 $ files = $ this ->formatTemplateFiles ();
464461 foreach ($ files as $ file ) {
You can’t perform that action at this time.
0 commit comments