Skip to content

Commit 0244cb6

Browse files
committed
Trigger loki_components_repository_post_dispatch event after repository updates are done
1 parent 32dd6db commit 0244cb6

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

Controller/Index/Html.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ public function execute(): ResultInterface|ResponseInterface
7272
}
7373
}
7474

75+
$this->repositoryDispatcher->postDispatch();
76+
7577
if ($this->allowRendering($data)) {
7678
try {
7779
$htmlParts = $this->targetRenderer->render($layout, $data['targets']);

Util/Controller/RepositoryDispatcher.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,9 @@ public function dispatch(ComponentInterface $component, mixed $componentData): v
3333

3434
$repository->saveValue($componentData);
3535
}
36+
37+
public function postDispatch(): void
38+
{
39+
$this->eventManager->dispatch('loki_components_repository_post_dispatch');
40+
}
3641
}

0 commit comments

Comments
 (0)