ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilObjPersistentCertificateVerificationGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8{
12 private $dic;
13
17 private $fileService;
18
22 private $language;
23
24 public function __construct(
25 \ILIAS\DI\Container $dic = null,
28 ) {
29 if (null === $dic) {
30 global $DIC;
31 $dic = $DIC;
32 }
33 $this->dic = $dic;
34
35 if (null === $fileService) {
37 }
38 $this->fileService = $fileService;
39
40 if (null === $language) {
41 $language = $dic->language();
42 }
43 $this->language = $language;
44 }
45
53 public function downloadFromPortfolioPage(ilPortfolioPage $a_page, int $objectId, int $userId)
54 {
55 if (ilPCVerification::isInPortfolioPage($a_page, 'crta', (int) $objectId)) {
56 $this->fileService->deliverCertificate((int) $userId, (int) $objectId);
57 }
58
59 throw new ilException($this->language->txt('permission_denied'));
60 }
61}
An exception for terminatinating execution or to throw for unit testing.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
language handling
downloadFromPortfolioPage(ilPortfolioPage $a_page, int $objectId, int $userId)
__construct(\ILIAS\DI\Container $dic=null, ilPortfolioCertificateFileService $fileService=null, ilLanguage $language=null)
static isInPortfolioPage(ilPortfolioPage $a_page, $a_type, $a_id)
Page for user portfolio.
global $DIC
Definition: goto.php:24
language()
Definition: language.php:2
Class HTTPServicesTest.
Class ChatMainBarProvider \MainMenu\Provider.