File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -273,19 +273,19 @@ controller:
273
273
274
274
*Simply inject doctrine instead of fetching it from the container *
275
275
276
- :method: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ Controller::getUser ` (service: ``security.context ``)
276
+ :method: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ Controller::getUser ` (service: ``security.token_storage ``)
277
277
.. code-block :: php
278
278
279
279
$user = null;
280
- $token = $securityContext ->getToken();
280
+ $token = $tokenStorage ->getToken();
281
281
if (null !== $token && is_object($token->getUser())) {
282
282
$user = $token->getUser();
283
283
}
284
284
285
- :method: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ Controller::isGranted ` (service: ``security.context ``)
285
+ :method: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ Controller::isGranted ` (service: ``security.authorization_checker ``)
286
286
.. code-block :: php
287
287
288
- $securityContext ->isGranted($attributes, $object);
288
+ $authChecker ->isGranted($attributes, $object);
289
289
290
290
:method: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ Controller::redirect `
291
291
.. code-block :: php
You can’t perform that action at this time.
0 commit comments