vendor/se7enxweb/admin-ui/src/contracts/Controller/Controller.php line 18

Open in your IDE?
  1. <?php
  2. /**
  3. * @copyright Copyright (C) Ibexa AS. All rights reserved.
  4. * @license For full copyright and license information view LICENSE file distributed with this source code.
  5. */
  6. namespace Ibexa\Contracts\AdminUi\Controller;
  7. use Ibexa\Contracts\Core\Repository\Values\Content\Location;
  8. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  9. use Symfony\Component\HttpFoundation\RedirectResponse;
  10. abstract class Controller extends AbstractController
  11. {
  12. public function performAccessCheck()
  13. {
  14. $this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
  15. }
  16. /**
  17. * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $location
  18. * @param string $uriFragment
  19. *
  20. * @return \Symfony\Component\HttpFoundation\RedirectResponse
  21. */
  22. public function redirectToLocation(Location $location, string $uriFragment = ''): RedirectResponse
  23. {
  24. return $this->redirectToRoute('ibexa.content.view', [
  25. 'contentId' => $location->contentId,
  26. 'locationId' => $location->id,
  27. '_fragment' => $uriFragment,
  28. ]);
  29. }
  30. }
  31. class_alias(Controller::class, 'EzSystems\EzPlatformAdminUiBundle\Controller\Controller');