ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\Certificate\CertificateResourceHandler Class Reference
+ Collaboration diagram for ILIAS\Certificate\CertificateResourceHandler:

Public Member Functions

 __construct (private readonly ilUserCertificateRepository $user_certificate_repo, private readonly ilCertificateTemplateDatabaseRepository $certificate_template_repo, private readonly IRSS $irss, private readonly ilObjCertificateSettings $global_certificate_settings, private readonly ilCertificateTemplateStakeholder $stakeholder)
 
 handleResourceChange (ResourceIdentification $background_image)
 

Detailed Description

Definition at line 30 of file CertificateResourceHandler.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Certificate\CertificateResourceHandler::__construct ( private readonly ilUserCertificateRepository  $user_certificate_repo,
private readonly ilCertificateTemplateDatabaseRepository  $certificate_template_repo,
private readonly IRSS  $irss,
private readonly ilObjCertificateSettings  $global_certificate_settings,
private readonly ilCertificateTemplateStakeholder  $stakeholder 
)

Definition at line 32 of file CertificateResourceHandler.php.

38  {
39  }

Member Function Documentation

◆ handleResourceChange()

ILIAS\Certificate\CertificateResourceHandler::handleResourceChange ( ResourceIdentification  $background_image)

Definition at line 41 of file CertificateResourceHandler.php.

References null, and ILIAS\ResourceStorage\Identification\AbstractIdentification\serialize().

41  : void
42  {
43  if (
44  !$this->user_certificate_repo->isResourceUsed($background_image->serialize()) &&
45  !$this->certificate_template_repo->isResourceUsed($background_image->serialize()) &&
46  (
47  $this->global_certificate_settings->getBackgroundImageIdentification() === null ||
48  (
49  $this->global_certificate_settings
50  ->getBackgroundImageIdentification() instanceof ResourceIdentification &&
51  $this->global_certificate_settings
52  ->getBackgroundImageIdentification()->serialize() !== $background_image->serialize()
53  )
54  )
55  ) {
56  $this->irss->manage()->remove($background_image, $this->stakeholder);
57  }
58  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: