FOSSology  4.4.0
Open Source License Compliance by Open Source Software
IpraView.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2022 Siemens AG
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
7 
9 
12 
13 class IpraView extends Xpview
14 {
15  const NAME = 'ipra-view';
16 
17  function __construct()
18  {
19  $this->decisionTableName = "ipra_decision";
20  $this->tableName = "ipra";
21  $this->modBack = 'ipra-hist';
22  $this->optionName = "skipFileIpra";
23  $this->ajaxAction = "setNextPrevIpra";
24  $this->skipOption = "noIpra";
25  $this->highlightTypeToStringMap = array(Highlight::IPRA => 'Patent Relevant');
26  $this->typeToHighlightTypeMap = array('ipra' => Highlight::IPRA);
27  $this->xptext = 'patent relevant';
28  parent::__construct(self::NAME,array(
29  self::TITLE => _("View patent relevant Analysis")
30  ));
31  }
32 
37  function RegisterMenus()
38  {
39  $itemId = GetParm("item", PARM_INTEGER);
40  $textFormat = $this->microMenu->getFormatParameter($itemId);
41  $pageNumber = GetParm("page", PARM_INTEGER);
42  $this->microMenu->addFormatMenuEntries($textFormat, $pageNumber);
43 
44  // For all other menus, permit coming back here.
45  $uploadId = GetParm("upload", PARM_INTEGER);
46  if (!empty($itemId) && !empty($uploadId)) {
47  $menuText = "IPRA";
48  $tooltipraText = "Patent Relevant Analysis";
49  $menuPosition = 56;
50  $URI = IpraView::NAME . Traceback_parm_keep(array("show", "format", "page", "upload", "item"));
51  $this->microMenu->insert(MicroMenu::TARGET_DEFAULT, $menuText, $menuPosition, $this->getName(), $URI, $tooltipraText);
52  }
53  $licId = GetParm("lic", PARM_INTEGER);
54  if (!empty($licId)) {
55  $this->NoMenu = 1;
56  }
57  }
58 }
59 
60 register_plugin(new IpraView());
RegisterMenus()
Customize submenus.
Definition: IpraView.php:37
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.