From df71c1f6ed9e8485eefdae4b16ae86129f6697c0 Mon Sep 17 00:00:00 2001 From: Jeroen Boersma Date: Fri, 3 Mar 2023 11:51:36 +0100 Subject: [PATCH] Correct use of $block and imported usages --- src/view/frontend/templates/script/rumvision.phtml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/view/frontend/templates/script/rumvision.phtml b/src/view/frontend/templates/script/rumvision.phtml index 353e4c9..1b719ba 100755 --- a/src/view/frontend/templates/script/rumvision.phtml +++ b/src/view/frontend/templates/script/rumvision.phtml @@ -1,13 +1,15 @@ getData('rumvision_view_model'); - -if (!$viewModel->shouldIncludeScript()) { +/** @var Rumvision $viewModel */ +$viewModel = $block->getData('rumvision_view_model'); +if (! $viewModel->shouldIncludeScript()) { return; } ?>