ILIAS  release_7 Revision v7.30-3-g800a261c036
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, ?ilObjCertificateSettings $global_certificate_settings=null, string $webDirectory=CLIENT_WEB_DIR, string $global_certificate_path=null)
 

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
 
 $global_certificate_path
 
 $global_certificate_settings
 

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,
?ilObjCertificateSettings  $global_certificate_settings = null,
string  $webDirectory = CLIENT_WEB_DIR,
string  $global_certificate_path = null 
)
Parameters
ilDBInterface$database
ilCertificateFactory$certificateFactory
ilCertificateTemplateRepository$templateRepository
\ILIAS\Filesystem\Filesystem | null$fileSystem
illLogger$logger
ilCertificateObjectHelper | null$objectHelper
string$rootDirectory

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

References $database, $DIC, $fileSystem, $global_certificate_path, $global_certificate_settings, $logger, $objectHelper, $pathFactory, $templateRepository, $webDirectory, CLIENT_WEB_DIR, getBackgroundImageThumbPath(), ilObject\getId(), ilObject\getType(), ILIAS_VERSION_NUMERIC, and readActive().

69  {
70  $this->database = $database;
71  $this->pathFactory = $pathFactory;
72  $this->templateRepository = $templateRepository;
73 
74  if (null === $logger) {
75  global $DIC;
76  $logger = $DIC->logger()->cert();
77  }
78  $this->logger = $logger;
79 
80  if (null === $fileSystem) {
81  global $DIC;
82  $fileSystem = $DIC->filesystem()->web();
83  }
84  $this->fileSystem = $fileSystem;
85 
86  if (null === $objectHelper) {
87  $objectHelper = new ilCertificateObjectHelper();
88  }
89  $this->objectHelper = $objectHelper;
90 
93  }
94  $this->global_certificate_settings = $global_certificate_settings;
95 
96 
97  if (null === $global_certificate_path) {
98  $global_certificate_path = $this->global_certificate_settings->getDefaultBackgroundImagePath(true);
99  }
100  $this->global_certificate_path = $global_certificate_path;
101 
102  $this->webDirectory = $webDirectory;
103  }
Class ilObjCertificateSettings.
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

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 244 of file class.ilCertificateCloneAction.php.

Referenced by getBackgroundImageThumbPath().

245  {
246  return "background.jpg";
247  }
+ 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 254 of file class.ilCertificateCloneAction.php.

References getBackgroundImageName().

Referenced by __construct().

254  : string
255  {
256  return $this->webDirectory . $certificatePath . $this->getBackgroundImageName() . ".thumb.jpg";
257  }
getBackgroundImageName()
Returns the filename of the background image.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readActive()

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

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

References $query.

Referenced by __construct().

230  : int
231  {
232  $sql = 'SELECT obj_id FROM il_certificate WHERE obj_id = ' . $this->database->quote($objectId, 'integer');
233 
234  $query = $this->database->query($sql);
235 
236  return $this->database->numRows($query);
237  }
$query
+ Here is the caller graph for this function:

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().

◆ $global_certificate_path

ilCertificateCloneAction::$global_certificate_path
private

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

Referenced by __construct().

◆ $global_certificate_settings

ilCertificateCloneAction::$global_certificate_settings
private

Definition at line 48 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: