40 public function __construct()
42 parent::__construct(self::NAME, array(
43 self::TITLE =>
"About Fossology",
44 self::MENU_LIST =>
"Help::About",
45 self::REQUIRES_LOGIN =>
false,
48 $this->licenseDao = $this->
getObject(
'dao.license');
55 protected function handle(Request $request)
58 'licenseCount' => $this->licenseDao->getLicenseCount(),
59 'project' => _(
"FOSSology"),
60 'copyright' => _(
"Copyright (C) 2007-2014 Hewlett-Packard Development Company, L.P.<br>\nCopyright (C) 2014-2017 Siemens AG."),
65 $latestRelease = $repositoryApi->getLatestRelease();
66 $commits = $repositoryApi->getCommitsOfLastDays(30);
67 $commit = empty($commits) ?
'' : substr($commits[0][
'sha'],0,6);
69 $vars = array_merge($vars, array(
70 'latestVersion' => $latestRelease,
71 'lastestCommit' => $commit));
74 return $this->
render(
'about.html.twig', $this->mergeWithDefault($vars));
static isAdmin()
Check if user is admin.
Helper class to get the latest release and commits from GitHub API.
render($templateName, $vars=null, $headers=null)