ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjPersistentCertificateVerificationGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
27{
29 private readonly ilLanguage $language;
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
56 public function downloadFromPortfolioPage(ilPortfolioPage $a_page, int $objectId, int $userId): void
57 {
58 if (ilPCVerification::isInPortfolioPage($a_page, 'crta', $objectId)) {
59 $this->fileService->deliverCertificate($userId, $objectId);
60 }
61
62 throw new ilException($this->language->txt('permission_denied'));
63 }
64}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Base class for ILIAS Exception handling.
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...
$dic
Definition: ltiresult.php:33
global $DIC
Definition: shib_login.php:26