Skip to content

Commit 02a959d

Browse files
committed
Update Layout.php
trigger layout_render_before before layout rendering
1 parent 9546277 commit 02a959d

File tree

1 file changed

+4
-3
lines changed
  • lib/internal/Magento/Framework/View/Result

1 file changed

+4
-3
lines changed

lib/internal/Magento/Framework/View/Result/Layout.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,13 @@ public function renderResult(ResponseInterface $response)
157157
{
158158
\Magento\Framework\Profiler::start('LAYOUT');
159159
\Magento\Framework\Profiler::start('layout_render');
160-
160+
161+
$this->eventManager->dispatch('layout_render_before');
162+
$this->eventManager->dispatch('layout_render_before_' . $this->request->getFullActionName());
163+
161164
$this->applyHttpHeaders($response);
162165
$this->render($response);
163166

164-
$this->eventManager->dispatch('layout_render_before');
165-
$this->eventManager->dispatch('layout_render_before_' . $this->request->getFullActionName());
166167
\Magento\Framework\Profiler::stop('layout_render');
167168
\Magento\Framework\Profiler::stop('LAYOUT');
168169
return $this;

0 commit comments

Comments
 (0)