ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilCertificateCloneAction Class Reference
+ Collaboration diagram for ilCertificateCloneAction:

Public Member Functions

 __construct (private readonly ilDBInterface $database, private readonly ilCertificatePathFactory $pathFactory, private readonly ilCertificateTemplateRepository $templateRepository, private readonly string $webDirectory=CLIENT_WEB_DIR, ?Filesystem $fileSystem=null, ?ilCertificateObjectHelper $objectHelper=null, ?ilObjCertificateSettings $global_certificate_settings=null, string $global_certificate_path=null)
 

Private Member Functions

 isActive (int $objectId)
 
 getBackgroundImageName ()
 
 getBackgroundImageThumbPath (string $certificatePath)
 

Private Attributes

readonly Filesystem $fileSystem
 
readonly ilCertificateObjectHelper $objectHelper
 
readonly string $global_certificate_path
 
readonly ilObjCertificateSettings $global_certificate_settings
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilCertificateCloneAction::__construct ( private readonly ilDBInterface  $database,
private readonly ilCertificatePathFactory  $pathFactory,
private readonly ilCertificateTemplateRepository  $templateRepository,
private readonly string  $webDirectory = CLIENT_WEB_DIR,
?Filesystem  $fileSystem = null,
?ilCertificateObjectHelper  $objectHelper = null,
?ilObjCertificateSettings  $global_certificate_settings = null,
string  $global_certificate_path = null 
)

Definition at line 36 of file class.ilCertificateCloneAction.php.

References $DIC, $fileSystem, $global_certificate_path, $global_certificate_settings, $objectHelper, CLIENT_WEB_DIR, getBackgroundImageThumbPath(), ilObjCertificateSettings\getDefaultBackgroundImagePath(), ilObject\getId(), ilObject\getType(), ILIAS_VERSION_NUMERIC, and isActive().

45  {
46  if (null === $fileSystem) {
47  global $DIC;
48  $fileSystem = $DIC->filesystem()->web();
49  }
50  $this->fileSystem = $fileSystem;
51 
52  if (null === $objectHelper) {
54  }
55  $this->objectHelper = $objectHelper;
56 
59  }
60  $this->global_certificate_settings = $global_certificate_settings;
61 
62  if (null === $global_certificate_path) {
63  $global_certificate_path = $this->global_certificate_settings->getDefaultBackgroundImagePath(true);
64  }
65  $this->global_certificate_path = $global_certificate_path;
66  }
readonly ilObjCertificateSettings $global_certificate_settings
global $DIC
Definition: feed.php:28
Class ilObjCertificateSettings.
readonly ilCertificateObjectHelper $objectHelper
+ Here is the call graph for this function:

Member Function Documentation

◆ getBackgroundImageName()

ilCertificateCloneAction::getBackgroundImageName ( )
private

Definition at line 194 of file class.ilCertificateCloneAction.php.

Referenced by getBackgroundImageThumbPath().

194  : string
195  {
196  return "background.jpg";
197  }
+ Here is the caller graph for this function:

◆ getBackgroundImageThumbPath()

ilCertificateCloneAction::getBackgroundImageThumbPath ( string  $certificatePath)
private

Definition at line 199 of file class.ilCertificateCloneAction.php.

References getBackgroundImageName().

Referenced by __construct().

199  : string
200  {
201  return $this->webDirectory . $certificatePath . $this->getBackgroundImageName() . ".thumb.jpg";
202  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActive()

ilCertificateCloneAction::isActive ( int  $objectId)
private

Definition at line 187 of file class.ilCertificateCloneAction.php.

Referenced by __construct().

187  : bool
188  {
189  $sql = 'SELECT 1 FROM il_certificate WHERE obj_id = ' . $this->database->quote($objectId, 'integer');
190 
191  return (bool) $this->database->fetchAssoc($this->database->query($sql));
192  }
+ Here is the caller graph for this function:

Field Documentation

◆ $fileSystem

readonly Filesystem ilCertificateCloneAction::$fileSystem
private

Definition at line 31 of file class.ilCertificateCloneAction.php.

Referenced by __construct().

◆ $global_certificate_path

readonly string ilCertificateCloneAction::$global_certificate_path
private

Definition at line 33 of file class.ilCertificateCloneAction.php.

Referenced by __construct().

◆ $global_certificate_settings

readonly ilObjCertificateSettings ilCertificateCloneAction::$global_certificate_settings
private

Definition at line 34 of file class.ilCertificateCloneAction.php.

Referenced by __construct().

◆ $objectHelper

readonly ilCertificateObjectHelper ilCertificateCloneAction::$objectHelper
private

Definition at line 32 of file class.ilCertificateCloneAction.php.

Referenced by __construct().


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