ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilCertificateDownloadValidator.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3
12{
17
22
27 public function __construct(
30 ) {
33 }
34 $this->userCertificateAccessValidator = $userCertificateAccessValidator;
35
36 if (null === $activeValidator) {
38 }
39 $this->activeValidator = $activeValidator;
40 }
41
47 public function isCertificateDownloadable(int $userId, int $objId)
48 {
49 if (false === $this->activeValidator->validate()) {
50 return false;
51 }
52
53 return $this->userCertificateAccessValidator->validate($userId, $objId);
54 }
55}
An exception for terminatinating execution or to throw for unit testing.
Validates if an active certificate is stored in the database and can be downloaded by the user.
__construct(ilCertificateUserCertificateAccessValidator $userCertificateAccessValidator=null, ilCertificateActiveValidator $activeValidator=null)
$objId
Definition: xapitoken.php:39