Skip to content

Commit

Permalink
fix: open settings together with cms_pico
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Oct 22, 2024
1 parent aaa84e0 commit 056c967
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/Handler/FooterHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

class FooterHandler {
private QrCode $qrCode;
private Environment $twigEnvironment;
private File $file;
private FileEntity $fileEntity;
private const MIN_QRCODE_SIZE = 100;
Expand All @@ -45,9 +44,6 @@ public function __construct(
private IL10N $l10n,
private ITempManager $tempManager,
) {
$this->twigEnvironment = new Environment(
new FilesystemLoader(),
);
}

public function getFooter(File $file, FileEntity $fileEntity): string {
Expand Down Expand Up @@ -102,7 +98,10 @@ private function getMetadata(): array {

private function getRenderedHtmlFooter(): string {
try {
return $this->twigEnvironment
$twigEnvironment = new Environment(
new FilesystemLoader(),
);
return $twigEnvironment
->createTemplate($this->getTemplate())
->render($this->getTemplateVars());
} catch (SyntaxError $e) {
Expand Down

0 comments on commit 056c967

Please sign in to comment.