ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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,
27  ilLanguage $language = 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 }
downloadFromPortfolioPage(ilPortfolioPage $a_page, int $objectId, int $userId)
Class ChatMainBarProvider .
static isInPortfolioPage(ilPortfolioPage $a_page, $a_type, $a_id)
Class HTTPServicesTest.
Page for user portfolio.
$DIC
Definition: xapitoken.php:46
language handling
language()
Definition: language.php:2
__construct(\ILIAS\DI\Container $dic=null, ilPortfolioCertificateFileService $fileService=null, ilLanguage $language=null)