vendor/sonata-project/user-bundle/src/Controller/AdminSecurityController.php line 20

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * This file is part of the Sonata Project package.
  5.  *
  6.  * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  7.  *
  8.  * For the full copyright and license information, please view the LICENSE
  9.  * file that was distributed with this source code.
  10.  */
  11. namespace Sonata\UserBundle\Controller;
  12. // NEXT_MAJOR: remove this file
  13. @trigger_error(
  14.     'The '.__NAMESPACE__.'\AdminSecurityController class is deprecated since version 4.3.0 and will be removed in 5.0.'
  15.     .' Use '.__NAMESPACE__.'\CheckLoginAction, '.__NAMESPACE__.'\LoginAction or '.__NAMESPACE__.'\LogoutAction instead.',
  16.     E_USER_DEPRECATED
  17. );
  18. use Sonata\UserBundle\Action\CheckLoginAction;
  19. use Sonata\UserBundle\Action\LoginAction;
  20. use Sonata\UserBundle\Action\LogoutAction;
  21. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  22. use Symfony\Component\HttpFoundation\Request;
  23. use Symfony\Component\HttpFoundation\Response;
  24. class AdminSecurityController extends Controller
  25. {
  26.     public function loginAction(Request $request): Response
  27.     {
  28.         /** @var LoginAction $loginAction */
  29.         $loginAction $this->container->get(LoginAction::class);
  30.         return $loginAction($request);
  31.     }
  32.     public function checkAction(): void
  33.     {
  34.         /** @var CheckLoginAction $checkLoginAction */
  35.         $checkLoginAction $this->container->get(CheckLoginAction::class);
  36.         $checkLoginAction();
  37.     }
  38.     public function logoutAction(): void
  39.     {
  40.         /** @var LogoutAction $logoutAction */
  41.         $logoutAction $this->container->get(LogoutAction::class);
  42.         $logoutAction();
  43.     }
  44. }