FOSSology  4.4.0
Open Source License Compliance by Open Source Software
EccView.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2014-2015 Siemens AG
4  Author: Johannes Najjar
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
8 
10 
13 
14 class EccView extends Xpview
15 {
16  const NAME = 'ecc-view';
17 
18  function __construct()
19  {
20  $this->decisionTableName = "ecc_decision";
21  $this->tableName = "ecc";
22  $this->modBack = 'ecc-hist';
23  $this->optionName = "skipFileEcc";
24  $this->ajaxAction = "setNextPrevEcc";
25  $this->skipOption = "noEcc";
26  $this->highlightTypeToStringMap = array(Highlight::ECC => 'Export Restriction');
27  $this->typeToHighlightTypeMap = array('ecc' => Highlight::ECC);
28  $this->xptext = 'export restriction';
29  parent::__construct(self::NAME, array(
30  self::TITLE => _("View Export Control and Customs Analysis")
31  ));
32  }
33 
38  function RegisterMenus()
39  {
40  $itemId = GetParm("item", PARM_INTEGER);
41  $textFormat = $this->microMenu->getFormatParameter($itemId);
42  $pageNumber = GetParm("page", PARM_INTEGER);
43  $this->microMenu->addFormatMenuEntries($textFormat, $pageNumber);
44 
45  // For all other menus, permit coming back here.
46  $uploadId = GetParm("upload", PARM_INTEGER);
47  if (!empty($itemId) && !empty($uploadId)) {
48  $menuText = "ECC";
49  $tooltipText = "Export Control Classification";
50  $menuPosition = 56;
51  $URI = EccView::NAME . Traceback_parm_keep(array("show", "format", "page", "upload", "item"));
52  $this->microMenu->insert(MicroMenu::TARGET_DEFAULT, $menuText, $menuPosition, $this->getName(), $URI, $tooltipText);
53  }
54  $licId = GetParm("lic", PARM_INTEGER);
55  if (!empty($licId)) {
56  $this->NoMenu = 1;
57  }
58  }
59 }
60 
61 register_plugin(new EccView());
RegisterMenus()
Customize submenus.
Definition: EccView.php:38
const PARM_INTEGER
Definition: common-parm.php:14
GetParm($parameterName, $parameterType)
This function will retrieve the variables and check data types.
Definition: common-parm.php:46
Traceback_parm_keep($List)
Create a new URI, keeping only these items.
Namespace for Copyright agent's UI components.