8 namespace Fossology\UI\Page;
13 use Symfony\Component\HttpFoundation\Request;
14 use Symfony\Component\HttpFoundation\Response;
18 const NAME =
"admin_all_license_to_csv";
20 function __construct()
22 parent::__construct(self::NAME, array(
23 self::TITLE =>
"Admin All Groups License CSV Export",
24 self::MENU_LIST =>
"Admin::License Admin::CSV Export All",
25 self::REQUIRES_LOGIN =>
true,
34 protected function handle(Request $request)
36 $confirmed = $request->get(
'confirmed',
false);
37 $referer = $request->headers->get(
'referer');
38 $fileName =
"fossology-license-export-" . date(
"YMj-Gis") .
'.csv';
41 $downloadUrl =
"?mod=" . self::NAME .
"&rf=" . $request->get(
'rf') .
"&confirmed=true";
45 $licenseCsvExport = new \Fossology\Lib\Application\LicenseCsvExport($this->
getObject(
'db.manager'));
46 $content = $licenseCsvExport->createCsv(intval($request->get(
'rf')),
true);
51 register_plugin(
new AdminAllLicenseToCSV());
Contains the constants and helpers for authentication of user.
static getDownloadConfirmationResponse($downloadUrl, $fileName, $referer)
static getDownloadResponse($content, $fileName, $contentType='text/csv')