FOSSology  4.7.1
Open Source License Compliance by Open Source Software
AdminCustomTextRedirect.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2025 Harshit Gandhi <gandhiharshit716@gmail.com>
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
7 
8 namespace Fossology\UI\Page;
9 
12 use Symfony\Component\HttpFoundation\Request;
13 use Symfony\Component\HttpFoundation\Response;
14 use Symfony\Component\HttpFoundation\RedirectResponse;
15 
21 {
22  const NAME = "admin_custom_text_redirect";
23 
24  function __construct()
25  {
26  parent::__construct(self::NAME, array(
27  self::TITLE => "Text Management",
28  self::MENU_LIST => "Admin::Text Management",
29  self::REQUIRES_LOGIN => true,
30  self::PERMISSION => Auth::PERM_ADMIN
31  ));
32  }
33 
38  protected function handle(Request $request)
39  {
40  // Redirect to the list page
41  $redirectUrl = Traceback_uri() . '?mod=admin_custom_text_list';
42  return new RedirectResponse($redirectUrl);
43  }
44 }
45 
46 register_plugin(new AdminCustomTextRedirect());
Contains the constants and helpers for authentication of user.
Definition: Auth.php:24
Traceback_uri()
Get the URI without query to this location.
Definition: common-parm.php:97