Skip to content

Commit 71f5ee7

Browse files
authored
Merge pull request #62 from drupal-pattern-lab/hotfix/cybtachyon/RHPC-864--twig-render
RHPC-864: Casts rendered twig to string context
2 parents c5cd62c + fd6226c commit 71f5ee7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Plugin/Block/PatternkitBlock.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
use Drupal\Component\Utility\Xss;
88
use Drupal\Core\Ajax\AjaxResponse;
99
use Drupal\Core\Ajax\ReplaceCommand;
10-
use Drupal\Core\Annotation\Translation;
11-
use Drupal\Core\Block\Annotation\Block;
1210
use Drupal\Core\Block\BlockBase;
1311
use Drupal\Core\Block\BlockManagerInterface;
1412
use Drupal\Core\Entity\EntityTypeManagerInterface;
@@ -610,7 +608,7 @@ public function build() {
610608
$template = str_replace($token, $placeholder, $template);
611609
}
612610
}
613-
$value = $this->twig->renderInline($template, $template_context);
611+
$value = (string) $this->twig->renderInline($template, $template_context);
614612
});
615613
$pattern->config = $config;
616614
}

0 commit comments

Comments
 (0)