How to instantiate $user in SignFormFactory

Notice: This thread is very old.
ydenda
Member | 21
+
0
-

Hello,

I arranged my nette project structure according this article: http://blog.jerryklimcik.cz/…e-ve-vyvoji/

Now I'd like to use SignFormFactory from sandbox to allow login for users/admins, nevertheless I experienced following issue:
Tracy says Argument 1 passed to App\Forms\SignFormFactory::__construct() must be an instance of Nette\Security\User, none given

Could you please point me where I made mistake or how can I override such error?
I checked this forum but without success.

Thank you in advance
Ydenda

Last edited by ydenda (2015-11-16 20:39)

romiix.org
Member | 343
+
0
-

You creating SignFormFactory in DIC (config.neon or Extension)?

Show this code.

ydenda
Member | 21
+
0
-

is this correct?
I hope that, the relevant factory is default:

services:

  • App\Model\UserManager
  • App\Forms\SignFormFactory

router: App\RouterFactory::createRouter
app.authorizatorFactory: App\AuthorizatorFactory
app.authorizator: @app.authorizatorFactory::create

Last edited by ydenda (2015-11-16 22:37)

David Matějka
Moderator | 6445
+
+1
-

and how do you create or get that service? do you use DI like it is in the sandbox ?

ydenda
Member | 21
+
0
-

Ouch, I believed that I haven't change the Sign presenter since beginning of the project, now I see that's my bad. Thank you gentlemen for support.

Last edited by ydenda (2015-11-16 23:14)