From 8af5d0731569a6c2ef2bcc55e48366f0a199b8ce Mon Sep 17 00:00:00 2001 From: Matus Kalafut Date: Tue, 24 Nov 2020 22:21:06 +0100 Subject: [PATCH] Switch to explicit presenters mapping remp/crm#441 --- src/DI/PrivatbankarModuleExtension.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/DI/PrivatbankarModuleExtension.php b/src/DI/PrivatbankarModuleExtension.php index b74f240..1939d0c 100644 --- a/src/DI/PrivatbankarModuleExtension.php +++ b/src/DI/PrivatbankarModuleExtension.php @@ -24,6 +24,14 @@ public function loadConfiguration() ); } + public function beforeCompile() + { + $builder = $this->getContainerBuilder(); + // load presenters from extension to Nette + $builder->getDefinition($builder->getByType(\Nette\Application\IPresenterFactory::class)) + ->addSetup('setMapping', [['Privatbankar' => 'Crm\PrivatbankarModule\Presenters\*Presenter']]); + } + /** * Return array of directories, that contain resources for translator. * @return string[]