Skip to content

Commit 3e393ac

Browse files
committed
Pass layout to loki_components_repository_post_dispatch
1 parent f98bcac commit 3e393ac

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Controller/Index/Html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function execute(): ResultInterface|ResponseInterface
7878
}
7979
}
8080

81-
$this->repositoryDispatcher->postDispatch($updates);
81+
$this->repositoryDispatcher->postDispatch($layout, $updates);
8282

8383
if ($this->allowRendering($data)) {
8484
try {

Util/Controller/RepositoryDispatcher.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Loki\Components\Component\ComponentRepositoryInterface;
88
use Loki\Components\Filter\Filter;
99
use Loki\Components\Validator\Validator;
10+
use Magento\Framework\View\LayoutInterface;
1011

1112
class RepositoryDispatcher
1213
{
@@ -34,11 +35,12 @@ public function dispatch(ComponentInterface $component, mixed $componentData): v
3435
$repository->saveValue($componentData);
3536
}
3637

37-
public function postDispatch(array $updates): void
38+
public function postDispatch(LayoutInterface $layout, array $updates): void
3839
{
3940
$this->eventManager->dispatch(
4041
'loki_components_repository_post_dispatch',
4142
[
43+
'layout' => $layout,
4244
'updates' => $updates
4345
]
4446
);

0 commit comments

Comments
 (0)