diff --git a/Framework/View/TemplateEngine/Twig.php b/Framework/View/TemplateEngine/Twig.php index 58455a8..4da8fad 100644 --- a/Framework/View/TemplateEngine/Twig.php +++ b/Framework/View/TemplateEngine/Twig.php @@ -47,11 +47,6 @@ class Twig extends Php */ protected $eventManager; - /** - * @var BlockInterface - */ - protected $currentBlock; - /** * @param ObjectManagerInterface $helperFactory * @param DirectoryList $directoryList @@ -151,11 +146,11 @@ public function catchGet(...$args) */ public function render(BlockInterface $block, $fileName, array $dictionary = []) { - $tmpBlock = $this->currentBlock; - $this->currentBlock = $block; + $tmpBlock = $this->_currentBlock; + $this->_currentBlock = $block; $this->twig->addGlobal('block', $block); $result = $this->getTemplate($fileName)->render($dictionary); - $this->currentBlock = $tmpBlock; + $this->_currentBlock = $tmpBlock; return $result; } diff --git a/composer.json b/composer.json index c802eb1..39bd157 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "twig/twig": "^3.0" }, "type": "magento2-module", - "version": "2.0.0", + "version": "2.0.1", "license": [ "OSL-3.0" ],