Skip to content

Commit

Permalink
Presenter::sendTemplate() added parameter $template
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Mar 25, 2020
1 parent 8ce51d6 commit 54c4f86
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Application/UI/Presenter.php
Expand Up @@ -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) {
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 54c4f86

Please sign in to comment.