FOSSology  4.4.0
Open Source License Compliance by Open Source Software
SpdxTwoCommaSeparatedValuesAgentPlugin.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2021 Orange
4  Author: Piotr Pszczola <piotr.pszczola@orange.com>
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
8 
9 namespace Fossology\SpdxTwo\UI;
10 
12 
18 {
19  public function __construct()
20  {
21  $this->Name = "agent_spdx2csv";
22  $this->Title = _("Export CSV report (SPDX)");
23  $this->AgentName = "spdx2csv";
24 
25  parent::__construct();
26  }
27 
32  function preInstall()
33  {
34  // no AgentCheckBox
35  }
36 
42  public function uploadsAdd($uploads)
43  {
44  if (count($uploads) == 0) {
45  return '';
46  }
47  return '--uploadsAdd='. implode(',', array_keys($uploads));
48  }
49 }
50 
51 register_plugin(new SpdxTwoCommaSeparatedValuesAgentPlugin());
Add multiple uploads to CSV reports including SPDX identifiers.