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[]