How to use my own implementation of PresenterFactory?

Notice: This thread is very old.
czm4rty
Member | 29
+
0
-

Hi, I would like to use my PresenterFactory, but I don't know where should I tell the application to use my own. I have found some definitions in NetteExtension class but I don't want to override 100 another classes. Is there some easier way to use own implementation of this class?

nanuqcz
Member | 822
+
+1
-

Hello,
just write it to the config.neon like this:

parameters:
	...

nette:
	...

services:
	nette.presenterFactory:
		class: YourPresenterFactoryClass()
czm4rty
Member | 29
+
0
-

I had to add param %baseDir and now it works like a charm. Thanks!

nanuqcz
Member | 822
+
0
-

In stable version, yes. In dev-master (so propably since Nette 2.3), PresenterFactory's constructor doesn't have this parameter: https://github.com/…80f9e694f4df. You are welcome :-)

Last edited by nanuqcz (2014-07-27 16:43)