9 namespace Fossology\UI\Page;
16 use Symfony\Component\HttpFoundation\Request;
17 use Symfony\Component\HttpFoundation\Response;
29 public function __construct()
31 parent::__construct(self::NAME, array(
32 self::TITLE =>
"About Fossology",
33 self::MENU_LIST =>
"Help::About",
34 self::REQUIRES_LOGIN =>
false,
37 $this->licenseDao = $this->
getObject(
'dao.license');
44 protected function handle(Request $request)
47 'licenseCount' => $this->licenseDao->getLicenseCount(),
48 'project' => _(
"FOSSology"),
53 $latestRelease = $repositoryApi->getLatestRelease();
54 $commits = $repositoryApi->getCommitsOfLastDays(30);
55 $commit = empty($commits) ?
'' : substr($commits[0][
'sha'],0,6);
57 $vars = array_merge($vars, array(
58 'latestVersion' => $latestRelease,
59 'lastestCommit' => $commit));
62 return $this->
render(
'about.html.twig', $this->mergeWithDefault($vars));
66 register_plugin(
new AboutPage());
Helper class to get the latest release and commits from GitHub API.
Contains the constants and helpers for authentication of user.
static isAdmin()
Check if user is admin.
render($templateName, $vars=null, $headers=null)