From 2b4bb3430b0d4518b3d7de8c2c93ca3df38acc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Postler?= Date: Sun, 24 Apr 2022 15:09:49 +0200 Subject: [PATCH] Update ComponentGenerator.php --- src/ComponentGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ComponentGenerator.php b/src/ComponentGenerator.php index 07b09a3..200b36c 100644 --- a/src/ComponentGenerator.php +++ b/src/ComponentGenerator.php @@ -127,7 +127,7 @@ public function generateControl(string $base): PhpFile } } - $renderMethod->addBody("\$this->template->setFile(__DIR__ . '/" . ($this->withTemplateName ? "' . \$this->templateName . '" : $this->lname) . ".latte');"); + $renderMethod->addBody("\$this->template->render(__DIR__ . '/" . ($this->withTemplateName ? "' . \$this->templateName . '" : $this->lname) . ".latte');"); $file = (new PhpFile)->setStrictTypes(); $file->addNamespace($namespace);