ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilCertificateCloneAction Class Reference
+ Collaboration diagram for ilCertificateCloneAction:

Public Member Functions

 __construct (ilDBInterface $database, ilCertificatePathFactory $pathFactory, ilCertificateTemplateRepository $templateRepository, \ILIAS\Filesystem\Filesystem $fileSystem=null, ilLogger $logger=null, ilCertificateObjectHelper $objectHelper=null, string $webDirectory=CLIENT_WEB_DIR)
 

Private Member Functions

 readActive (int $objectId)
 
 getBackgroundImageName ()
 Returns the filename of the background image. More...
 
 getBackgroundImageThumbPath (string $certificatePath)
 Returns the filesystem path of the background image thumbnail. More...
 

Private Attributes

 $logger
 
 $pathFactory
 
 $templateRepository
 
 $database
 
 $fileSystem
 
 $objectHelper
 
 $webDirectory
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilCertificateCloneAction::__construct ( ilDBInterface  $database,
ilCertificatePathFactory  $pathFactory,
ilCertificateTemplateRepository  $templateRepository,
\ILIAS\Filesystem\Filesystem  $fileSystem = null,
ilLogger  $logger = null,
ilCertificateObjectHelper  $objectHelper = null,
string  $webDirectory = CLIENT_WEB_DIR 
)
Parameters
ilDBInterface$database
ilCertificateFactory$certificateFactory
ilCertificateTemplateRepository$templateRepository
\ILIAS\Filesystem\Filesystem | null$fileSystem
illLogger$logger
ilCertificateObjectHelper | null$objectHelper
string$rootDirectory

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

61 {
62 $this->database = $database;
63 $this->pathFactory = $pathFactory;
64 $this->templateRepository = $templateRepository;
65
66 if (null === $logger) {
67 global $DIC;
68 $logger = $DIC->logger()->cert();
69 }
70 $this->logger = $logger;
71
72 if (null === $fileSystem) {
73 global $DIC;
74 $fileSystem = $DIC->filesystem()->web();
75 }
76 $this->fileSystem = $fileSystem;
77
78 if (null === $objectHelper) {
80 }
81 $this->objectHelper = $objectHelper;
82
83 $this->webDirectory = $webDirectory;
84 }
$DIC
Definition: xapitoken.php:46

References $database, $DIC, $fileSystem, $logger, $objectHelper, $pathFactory, $templateRepository, and $webDirectory.

Member Function Documentation

◆ getBackgroundImageName()

ilCertificateCloneAction::getBackgroundImageName ( )
private

Returns the filename of the background image.

Returns
string The filename of the background image

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

219 {
220 return "background.jpg";
221 }

Referenced by getBackgroundImageThumbPath().

+ Here is the caller graph for this function:

◆ getBackgroundImageThumbPath()

ilCertificateCloneAction::getBackgroundImageThumbPath ( string  $certificatePath)
private

Returns the filesystem path of the background image thumbnail.

Parameters
$certificatePath
Returns
string The filesystem path of the background image thumbnail

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

228 : string
229 {
230 return $this->webDirectory . $certificatePath . $this->getBackgroundImageName() . ".thumb.jpg";
231 }
getBackgroundImageName()
Returns the filename of the background image.

References getBackgroundImageName().

+ Here is the call graph for this function:

◆ readActive()

ilCertificateCloneAction::readActive ( int  $objectId)
private
Parameters
integer$objectId
Returns
int

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

204 : int
205 {
206 $sql = 'SELECT obj_id FROM il_certificate WHERE obj_id = ' . $this->database->quote($objectId, 'integer');
207
208 $query = $this->database->query($sql);
209
210 return $this->database->numRows($query);
211 }
$query

References $query.

Field Documentation

◆ $database

ilCertificateCloneAction::$database
private

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

Referenced by __construct().

◆ $fileSystem

ilCertificateCloneAction::$fileSystem
private

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

Referenced by __construct().

◆ $logger

ilCertificateCloneAction::$logger
private

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

Referenced by __construct().

◆ $objectHelper

ilCertificateCloneAction::$objectHelper
private

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

Referenced by __construct().

◆ $pathFactory

ilCertificateCloneAction::$pathFactory
private

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

Referenced by __construct().

◆ $templateRepository

ilCertificateCloneAction::$templateRepository
private

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

Referenced by __construct().

◆ $webDirectory

ilCertificateCloneAction::$webDirectory
private

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

Referenced by __construct().


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