ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
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
11
class
ilCertificateDownloadValidator
12
{
16
private
$userCertificateAccessValidator
;
17
21
private
$activeValidator
;
22
27
public
function
__construct
(
28
ilCertificateUserCertificateAccessValidator
$userCertificateAccessValidator
= null,
29
ilCertificateActiveValidator
$activeValidator
= null
30
) {
31
if
(null ===
$userCertificateAccessValidator
) {
32
$userCertificateAccessValidator
=
new
ilCertificateUserCertificateAccessValidator
();
33
}
34
$this->userCertificateAccessValidator =
$userCertificateAccessValidator
;
35
36
if
(null ===
$activeValidator
) {
37
$activeValidator
=
new
ilCertificateActiveValidator
();
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
}
ilCertificateUserCertificateAccessValidator
Definition:
class.ilCertificateUserCertificateAccessValidator.php:7
ilCertificateDownloadValidator\__construct
__construct(ilCertificateUserCertificateAccessValidator $userCertificateAccessValidator=null, ilCertificateActiveValidator $activeValidator=null)
Definition:
class.ilCertificateDownloadValidator.php:27
ilCertificateActiveValidator
Definition:
class.ilCertificateActiveValidator.php:7
ilCertificateDownloadValidator
Validates if an active certificate is stored in the database and can be downloaded by the user...
Definition:
class.ilCertificateDownloadValidator.php:11
ilCertificateDownloadValidator\$activeValidator
$activeValidator
Definition:
class.ilCertificateDownloadValidator.php:21
php
ilCertificateDownloadValidator\$userCertificateAccessValidator
$userCertificateAccessValidator
Definition:
class.ilCertificateDownloadValidator.php:16
ilCertificateDownloadValidator\isCertificateDownloadable
isCertificateDownloadable(int $userId, int $objId)
Definition:
class.ilCertificateDownloadValidator.php:47
Services
Certificate
classes
User
Validator
class.ilCertificateDownloadValidator.php
Generated on Thu Jan 16 2025 19:02:19 for ILIAS by
1.8.13 (using
Doxyfile
)