Skip to content
Permalink
Browse files

Presenter::sendTemplate() added parameter $template

  • Loading branch information
dg committed Jan 6, 2020
1 parent 8ce51d6 commit 54c4f869a705fb0a3360b5d11d5d51579b112438
Showing with 3 additions and 6 deletions.
  1. +3 −6 src/Application/UI/Presenter.php
@@ -242,9 +242,7 @@ public function run(Application\Request $request): Application\IResponse
}

// finish template rendering
if ($this->getTemplate()) {
$this->sendTemplate();
}
$this->sendTemplate();

} catch (Application\AbortException $e) {
}
@@ -445,12 +443,11 @@ public function setLayout($layout)


/**
* @throws Nette\Application\BadRequestException if no template found
* @throws Nette\Application\AbortException
*/
public function sendTemplate(): void
public function sendTemplate(ITemplate $template = null): void
{
$template = $this->getTemplate();
$template = $template ?: $this->getTemplate();
if (!$template->getFile()) {
$files = $this->formatTemplateFiles();
foreach ($files as $file) {

0 comments on commit 54c4f86

Please sign in to comment.
You can’t perform that action at this time.