8 namespace Fossology\UI\Page;
12 use Symfony\Component\HttpFoundation\Request;
13 use Symfony\Component\HttpFoundation\Response;
17 const NAME =
"admin_all_license_to_csv";
19 function __construct()
21 parent::__construct(self::NAME, array(
22 self::TITLE =>
"Admin All Groups License CSV Export",
23 self::MENU_LIST =>
"Admin::License Admin::CSV Export All",
24 self::REQUIRES_LOGIN =>
true,
33 protected function handle(Request $request)
35 $licenseCsvExport = new \Fossology\Lib\Application\LicenseCsvExport($this->
getObject(
'db.manager'));
36 $content = $licenseCsvExport->createCsv(intval($request->get(
'rf')),
true);
37 $fileName =
"fossology-license-export-".date(
"YMj-Gis");
39 'Content-type' =>
'text/csv, charset=UTF-8',
40 'Content-Disposition' =>
'attachment; filename='.$fileName.
'.csv',
41 'Pragma' =>
'no-cache',
42 'Cache-Control' =>
'no-cache, must-revalidate, maxage=1, post-check=0, pre-check=0',
43 'Expires' =>
'Expires: Thu, 19 Nov 1981 08:52:00 GMT');
45 return new Response($content, Response::HTTP_OK, $headers);
49 register_plugin(
new AdminAllLicenseToCSV());
Contains the constants and helpers for authentication of user.