9 namespace Fossology\UI\Page;
12 use Symfony\Component\HttpFoundation\Request;
13 use Symfony\Component\HttpFoundation\Response;
20 const NAME =
"thirdPartyLicenses-FOSSology";
22 const FILENAME =
"NOTICES-THIRDPARTY.html";
24 public function __construct()
26 parent::__construct(self::NAME, array(
27 self::TITLE =>
"Third Party Licenses",
28 self::MENU_LIST =>
"Help::Third Party Licenses",
29 self::REQUIRES_LOGIN =>
false,
37 protected function handle(Request $request)
39 $htmlFileContents =
"";
40 if (! file_exists(self::FILENAME)) {
41 $htmlFileContents =
"Cannot find <b><u>". self::FILENAME .
"</u></b> file";
43 $htmlFileContents = file_get_contents(self::FILENAME,
true);
44 $htmlFileContents =
"<div style='all:unset;'>".$htmlFileContents.
"</div>";
47 'htmlFileContents' => $htmlFileContents
49 return $this->
render(
'thirdPartyLicenses.html.twig', $this->mergeWithDefault($vars));
53 register_plugin(
new ThirdPartyLicensesPage());
render($templateName, $vars=null, $headers=null)
Third Party Licenses page on UI.