123 $this->lng =
$DIC[
'lng'];
124 $this->ctrl =
$DIC[
'ilCtrl'];
125 $this->
ilias = $DIC[
'ilias'];
126 $this->tree =
$DIC[
'tree'];
127 $this->
settings = $DIC[
'ilSetting'];
128 $this->log =
$DIC[
'ilLog'];
129 $this->db =
$DIC[
'ilDB'];
141 $logger =
$DIC->logger()->cert();
163 array(CLIENT_WEB_DIR,
'//'),
164 array(
'[CLIENT_WEB_DIR]',
'/'),
179 return "background.jpg";
199 return CLIENT_WEB_DIR . $this->certificatePath .
"background_upload.tmp";
209 return CLIENT_WEB_DIR . $this->certificatePath . $this->
getXSLName();
219 return "certificate.xml";
229 return "certificate.xml";
295 if (!file_exists($this->certificatePath)) {
304 fwrite($fileHandle, $xslfo);
316 $template = $this->templateRepository->fetchCurrentlyUsedCertificate($this->objectId);
318 $backgroundImagePath =
$template->getBackgroundImagePath();
319 if ($backgroundImagePath ===
'') {
323 $absolutePath = CLIENT_WEB_DIR . $backgroundImagePath;
325 if (file_exists($absolutePath)
326 && (filesize($absolutePath) > 0)
340 if (self::isActive()) {
341 if ($this->objectId && !self::isObjectActive($this->objectId)) {
An exception for terminatinating execution or to throw for unit testing.
Adapter class to provide certificate data for the certificate generator.
getBackgroundImageTempfilePath()
Returns the filesystem path of the background image temp file during upload.
getBackgroundImageDirectory($asRelative=false, $backgroundImagePath='')
Returns the filesystem path of the background image.
getBackgroundImageThumbPath()
Returns the filesystem path of the background image thumbnail.
getBackgroundImageThumbPathWeb()
Returns the web path of the background image thumbnail.
$placeholderDescriptionObject
__construct(ilCertificateAdapter $adapter, ilCertificatePlaceholderDescription $placeholderDescriptionObject, ilCertificatePlaceholderValues $placeholderValuesObject, $objectId, $certificatePath, ilCertificateTemplateRepository $templateRepository=null, ilUserCertificateRepository $certificateRepository=null)
ilCertificate constructor
createCertificateFile($xslfo, $filename='')
Saves the XSL-FO code to a file.
getBackgroundImagePathWeb()
Returns the web path of the background image.
deleteBackgroundImage($version)
Deletes the background image of a certificate.
isComplete()
Checks the status of the certificate.
getXSLName()
Returns the filename of the XSL-FO file.
setAdapter($adapter)
Sets the adapter.
getBackgroundImageName()
Returns the filename of the background image.
hasBackgroundImage()
Checks for the background image of the certificate.
static _getXSLName()
Returns the filename of the XSL-FO file.
getXSLPath()
Returns the filesystem path of the XSL-FO file.
getAdapter()
Gets the adapter.
static makeDirParents($a_dir)
Create a new directory and all parent directories.
static removeTrailingPathSeparators($path)
redirection script todo: (a better solution should control the processing via a xml file)