Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony][Symfony2]requires that you provide a value for the "$profilesql" argument.
szypi1989
post 20.08.2018, 07:57:38
Post #1





Grupa: Zarejestrowani
Postów: 207
Pomógł: 0
Dołączył: 7.09.2010

Ostrzeżenie: (0%)
-----


  1. Witam . Otóż mam problem. Podczas wykonywania przekierowania:
  2. return $this->forward('AppBundle:User:profileinfo', array(
  3. 'user' => $this->get('security.token_storage')->getToken()->getUser()
  4. ));


Pokazuje mi się błąd:
Controller "AppBundle\Controller\UserController::profileinfoAction()" requires that you provide a value for the "$profilesql" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one.

Nie Chce mi po prostu wstrzyknąć zależności podczas przekierowania. Jak to zrobić aby wstrzykneło?
To jest moja akcja z argumentami w kontrolerze:
  1. public function profileinfoAction(Request $request, $user, ProfileSql $profilesql) {}

I jak wstrzyknąć tą usługę ProfileSql $profilesql do przekierowania?
Próbowałem tak:
  1. return $this->forward('AppBundle:User:profileinfo', array(
  2. 'user' => $this->get('security.token_storage')->getToken()->getUser(), 'ProfileSql' => $profilesql
  3. ));

No ale niestety nie idzie.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 28.04.2024 - 06:27