ILIAS  release_8 Revision v8.24
class.ilObjPersistentCertificateVerificationGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27{
30
31 public function __construct(
32 ?Container $dic = null,
34 ?ilLanguage $language = null
35 ) {
36 if (null === $dic) {
37 global $DIC;
38 $dic = $DIC;
39 }
40
41 if (null === $fileService) {
43 }
44 $this->fileService = $fileService;
45
46 if (null === $language) {
47 $language = $dic->language();
48 }
49 $this->language = $language;
50 }
51
59 public function downloadFromPortfolioPage(ilPortfolioPage $a_page, int $objectId, int $userId): void
60 {
61 if (ilPCVerification::isInPortfolioPage($a_page, 'crta', $objectId)) {
62 $this->fileService->deliverCertificate($userId, $objectId);
63 }
64
65 throw new ilException($this->language->txt('permission_denied'));
66 }
67}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:32
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(?Container $dic=null, ?ilPortfolioCertificateFileService $fileService=null, ?ilLanguage $language=null)
static isInPortfolioPage(ilPortfolioPage $a_page, string $a_type, int $a_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
$dic
Definition: result.php:32