From 6e09d30273950aa7bff88512fc8dafafc4df2f4b Mon Sep 17 00:00:00 2001 From: Jan Vejvar Date: Sun, 7 Apr 2024 02:50:04 +0200 Subject: [PATCH] Latte bridge: add block rendering support --- src/Bridges/ApplicationLatte/Template.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Bridges/ApplicationLatte/Template.php b/src/Bridges/ApplicationLatte/Template.php index b9850a6f5..87fe8f85d 100644 --- a/src/Bridges/ApplicationLatte/Template.php +++ b/src/Bridges/ApplicationLatte/Template.php @@ -36,20 +36,20 @@ final public function getLatte(): Latte\Engine /** * Renders template to output. */ - public function render(?string $file = null, array $params = []): void + public function render(?string $file = null, array $params = [], bool $block = null): void { Nette\Utils\Arrays::toObject($params, $this); - $this->latte->render($file ?: $this->file, $this); + $this->latte->render($file ?: $this->file, $this, $block); } /** * Renders template to output. */ - public function renderToString(?string $file = null, array $params = []): string + public function renderToString(?string $file = null, array $params = [], bool $block = null): string { Nette\Utils\Arrays::toObject($params, $this); - return $this->latte->renderToString($file ?: $this->file, $this); + return $this->latte->renderToString($file ?: $this->file, $this, $block); }