ILIAS
Release_4_0_x_branch Revision 61816
|
Create PDF certificates. More...
Public Member Functions | |
__construct ($adapter) | |
ilCertificate constructor | |
getBackgroundImagePath () | |
Returns the filesystem path of the background image. | |
getBackgroundImageName () | |
Returns the filename of the background image. | |
getBackgroundImageThumbPath () | |
Returns the filesystem path of the background image thumbnail. | |
getBackgroundImageTempfilePath () | |
Returns the filesystem path of the background image temp file during upload. | |
getXSLPath () | |
Returns the filesystem path of the XSL-FO file. | |
getXSLName () | |
Returns the filename of the XSL-FO file. | |
getBackgroundImagePathWeb () | |
Returns the web path of the background image. | |
getBackgroundImageThumbPathWeb () | |
Returns the web path of the background image thumbnail. | |
deleteBackgroundImage () | |
Deletes the background image of a certificate. | |
cloneCertificate ($newObject) | |
Clone the certificate for another test object. | |
deleteCertificate () | |
Deletes the certificate and all it's data. | |
getFormFieldsFromFO () | |
Convert the XSL-FO to the certificate text and the form settings using XSL transformation. | |
processXHTML2FO ($form_data, $for_export=FALSE) | |
Convert the certificate text to XSL-FO using XSL transformation. | |
outCertificate ($params, $deliver=TRUE) | |
Creates a PDF certificate. | |
createPreview () | |
Creates a PDF preview of the XSL-FO certificate. | |
saveCertificate ($xslfo, $filename="") | |
Saves the XSL-FO code to a file. | |
uploadBackgroundImage ($image_tempfilename) | |
Uploads a background image for the certificate. | |
hasBackgroundImage () | |
Checks for the background image of the certificate. | |
isComplete () | |
Checks the status of the certificate. | |
_isComplete ($adapter) | |
Checks the status of the certificate. | |
getPageFormats () | |
Retrieves predefined page formats. | |
deliverExportFileXML () | |
Builds an export file in ZIP format and delivers it. | |
importCertificate ($zipfile, $filename) | |
Reads an import ZIP file and creates a certificate of it. | |
getAdapter () | |
Gets the adapter. | |
setAdapter ($adapter) | |
Sets the adapter. | |
createArchiveDirectory () | |
addPDFtoArchiveDirectory ($pdfdata, $dir, $filename) | |
Adds PDF data as a file to a given directory. | |
zipCertificatesInArchiveDirectory ($dir, $deliver=TRUE) | |
Create a ZIP file from a directory with certificates. |
Static Public Member Functions | |
static | _getXSLName () |
Returns the filename of the XSL-FO file. | |
static | _goto ($ref_id) |
Creates a redirect to a certificate download. |
Protected Attributes | |
$ctrl | |
$tree | |
$ilias | |
$tpl | |
$lng | |
$adapter |
Private Member Functions | |
exchangeCertificateVariables ($certificate_text, $insert_tags=array()) | |
Exchanges the variables in the certificate text with given values. |
Create PDF certificates.
Base class to create PDF certificates using XML-FO XML transformations
Definition at line 33 of file class.ilCertificate.php.
ilCertificate::__construct | ( | $adapter | ) |
ilCertificate constructor
object | $adapter | The certificate adapter needed to construct the certificate |
Definition at line 82 of file class.ilCertificate.php.
References $adapter, $ilCtrl, $ilias, $lng, $tpl, and $tree.
|
static |
Returns the filename of the XSL-FO file.
Definition at line 159 of file class.ilCertificate.php.
Referenced by _isComplete().
|
static |
Creates a redirect to a certificate download.
integer | $ref_id | Ref ID of the ILIAS object |
Definition at line 884 of file class.ilCertificate.php.
ilCertificate::_isComplete | ( | $adapter | ) |
Checks the status of the certificate.
object | $adapter | The certificate adapter |
Definition at line 623 of file class.ilCertificate.php.
References $adapter, and _getXSLName().
Referenced by ilTestEvaluationGUI\outEvaluation().
ilCertificate::addPDFtoArchiveDirectory | ( | $pdfdata, | |
$dir, | |||
$filename | |||
) |
Adds PDF data as a file to a given directory.
binary | $pdfdata | Binary PDF data |
string | $dir | Directory to contain the PDF data |
string | $filename | The filename to save the PDF data |
Definition at line 853 of file class.ilCertificate.php.
ilCertificate::cloneCertificate | ( | $newObject | ) |
Clone the certificate for another test object.
$newObject | The new certificate object |
Definition at line 217 of file class.ilCertificate.php.
References getAdapter(), getBackgroundImagePath(), getBackgroundImageThumbPath(), getXSLPath(), and ilUtil\makeDirParents().
ilCertificate::createArchiveDirectory | ( | ) |
Definition at line 838 of file class.ilCertificate.php.
Referenced by deliverExportFileXML(), and importCertificate().
ilCertificate::createPreview | ( | ) |
Creates a PDF preview of the XSL-FO certificate.
Definition at line 485 of file class.ilCertificate.php.
References $ilLog, ilUtil\deliverData(), exchangeCertificateVariables(), ilRpcClientFactory\factory(), and getXSLPath().
ilCertificate::deleteBackgroundImage | ( | ) |
Deletes the background image of a certificate.
Definition at line 194 of file class.ilCertificate.php.
References $result, getBackgroundImagePath(), getBackgroundImageTempfilePath(), and getBackgroundImageThumbPath().
ilCertificate::deleteCertificate | ( | ) |
Deletes the certificate and all it's data.
public
Definition at line 243 of file class.ilCertificate.php.
References ilUtil\delDir(), and getAdapter().
ilCertificate::deliverExportFileXML | ( | ) |
Builds an export file in ZIP format and delivers it.
Definition at line 696 of file class.ilCertificate.php.
References createArchiveDirectory(), ilUtil\delDir(), ilUtil\deliverFile(), getAdapter(), ilObjCertificateSettingsAccess\getBackgroundImageName(), getBackgroundImageName(), ilObjCertificateSettingsAccess\getBackgroundImagePath(), getBackgroundImagePath(), getXSLName(), getXSLPath(), ilObjCertificateSettingsAccess\hasBackgroundImage(), hasBackgroundImage(), ilUtil\makeDir(), saveCertificate(), and ilUtil\zip().
|
private |
Exchanges the variables in the certificate text with given values.
string | $certificate_text | The XSL-FO certificate text |
array | $insert_tags | An associative array containing the variables and the values to replace |
Definition at line 414 of file class.ilCertificate.php.
References getAdapter().
Referenced by createPreview(), and outCertificate().
ilCertificate::getAdapter | ( | ) |
Gets the adapter.
Definition at line 814 of file class.ilCertificate.php.
References $adapter.
Referenced by cloneCertificate(), deleteCertificate(), deliverExportFileXML(), exchangeCertificateVariables(), getBackgroundImagePath(), getBackgroundImagePathWeb(), getBackgroundImageTempfilePath(), getBackgroundImageThumbPath(), getFormFieldsFromFO(), getXSLPath(), importCertificate(), isComplete(), outCertificate(), saveCertificate(), and uploadBackgroundImage().
ilCertificate::getBackgroundImageName | ( | ) |
Returns the filename of the background image.
Definition at line 109 of file class.ilCertificate.php.
Referenced by deliverExportFileXML(), getBackgroundImagePath(), getBackgroundImagePathWeb(), getBackgroundImageThumbPath(), and uploadBackgroundImage().
ilCertificate::getBackgroundImagePath | ( | ) |
Returns the filesystem path of the background image.
Definition at line 99 of file class.ilCertificate.php.
References getAdapter(), and getBackgroundImageName().
Referenced by cloneCertificate(), deleteBackgroundImage(), deliverExportFileXML(), hasBackgroundImage(), importCertificate(), processXHTML2FO(), and uploadBackgroundImage().
ilCertificate::getBackgroundImagePathWeb | ( | ) |
Returns the web path of the background image.
Definition at line 169 of file class.ilCertificate.php.
References getAdapter(), getBackgroundImageName(), ILIAS_ABSOLUTE_PATH, and ilUtil\removeTrailingPathSeparators().
ilCertificate::getBackgroundImageTempfilePath | ( | ) |
Returns the filesystem path of the background image temp file during upload.
Definition at line 129 of file class.ilCertificate.php.
References getAdapter().
Referenced by deleteBackgroundImage(), and uploadBackgroundImage().
ilCertificate::getBackgroundImageThumbPath | ( | ) |
Returns the filesystem path of the background image thumbnail.
Definition at line 119 of file class.ilCertificate.php.
References getAdapter(), and getBackgroundImageName().
Referenced by cloneCertificate(), deleteBackgroundImage(), getBackgroundImageThumbPathWeb(), importCertificate(), and uploadBackgroundImage().
ilCertificate::getBackgroundImageThumbPathWeb | ( | ) |
Returns the web path of the background image thumbnail.
Definition at line 182 of file class.ilCertificate.php.
References getBackgroundImageThumbPath(), ILIAS_ABSOLUTE_PATH, and ilUtil\removeTrailingPathSeparators().
ilCertificate::getFormFieldsFromFO | ( | ) |
Convert the XSL-FO to the certificate text and the form settings using XSL transformation.
Definition at line 256 of file class.ilCertificate.php.
References getAdapter(), getXSLPath(), xslt_create(), xslt_error(), xslt_free(), and xslt_process().
ilCertificate::getPageFormats | ( | ) |
Retrieves predefined page formats.
Definition at line 645 of file class.ilCertificate.php.
Referenced by processXHTML2FO().
ilCertificate::getXSLName | ( | ) |
Returns the filename of the XSL-FO file.
Definition at line 149 of file class.ilCertificate.php.
Referenced by deliverExportFileXML(), and getXSLPath().
ilCertificate::getXSLPath | ( | ) |
Returns the filesystem path of the XSL-FO file.
Definition at line 139 of file class.ilCertificate.php.
References getAdapter(), and getXSLName().
Referenced by cloneCertificate(), createPreview(), deliverExportFileXML(), getFormFieldsFromFO(), isComplete(), outCertificate(), and saveCertificate().
ilCertificate::hasBackgroundImage | ( | ) |
Checks for the background image of the certificate.
Definition at line 588 of file class.ilCertificate.php.
References getBackgroundImagePath().
Referenced by deliverExportFileXML(), and processXHTML2FO().
ilCertificate::importCertificate | ( | $zipfile, | |
$filename | |||
) |
Reads an import ZIP file and creates a certificate of it.
Definition at line 729 of file class.ilCertificate.php.
References $file, $filename, ilUtil\convertImage(), createArchiveDirectory(), ilUtil\delDir(), getAdapter(), getBackgroundImagePath(), getBackgroundImageThumbPath(), ilUtil\getDir(), ilUtil\moveUploadedFile(), saveCertificate(), and ilUtil\unzip().
ilCertificate::isComplete | ( | ) |
Checks the status of the certificate.
Definition at line 605 of file class.ilCertificate.php.
References getAdapter(), and getXSLPath().
ilCertificate::outCertificate | ( | $params, | |
$deliver = TRUE |
|||
) |
Creates a PDF certificate.
array | $params | An array of parameters which is needed to create the certificate |
Definition at line 432 of file class.ilCertificate.php.
References $ilLog, $params, ilUtil\deliverData(), exchangeCertificateVariables(), ilRpcClientFactory\factory(), getAdapter(), and getXSLPath().
ilCertificate::processXHTML2FO | ( | $form_data, | |
$for_export = FALSE |
|||
) |
Convert the certificate text to XSL-FO using XSL transformation.
array | $form_data | The form data |
Definition at line 358 of file class.ilCertificate.php.
References $params, ilObjCertificateSettingsAccess\getBackgroundImagePath(), getBackgroundImagePath(), getPageFormats(), hasBackgroundImage(), xslt_create(), xslt_error(), xslt_free(), and xslt_process().
ilCertificate::saveCertificate | ( | $xslfo, | |
$filename = "" |
|||
) |
Saves the XSL-FO code to a file.
string | $xslfo | XSL-FO code |
Definition at line 525 of file class.ilCertificate.php.
References $filename, getAdapter(), getXSLPath(), and ilUtil\makeDirParents().
Referenced by deliverExportFileXML(), and importCertificate().
ilCertificate::setAdapter | ( | $adapter | ) |
Sets the adapter.
object | $adapter | Adapter |
Definition at line 824 of file class.ilCertificate.php.
References $adapter.
ilCertificate::uploadBackgroundImage | ( | $image_tempfilename | ) |
Uploads a background image for the certificate.
Creates a new directory for the certificate if needed. Removes an existing certificate image if necessary
string | $image_tempfilename | Name of the temporary uploaded image file |
Definition at line 547 of file class.ilCertificate.php.
References ilUtil\convertImage(), getAdapter(), getBackgroundImageName(), getBackgroundImagePath(), getBackgroundImageTempfilePath(), getBackgroundImageThumbPath(), ilUtil\makeDirParents(), and ilUtil\moveUploadedFile().
ilCertificate::zipCertificatesInArchiveDirectory | ( | $dir, | |
$deliver = TRUE |
|||
) |
Create a ZIP file from a directory with certificates.
string | $dir | Directory containing the certificates |
boolean | $deliver | TRUE to deliver the ZIP file, FALSE to return the filename only |
Definition at line 867 of file class.ilCertificate.php.
|
protected |
Definition at line 75 of file class.ilCertificate.php.
Referenced by __construct(), _isComplete(), getAdapter(), and setAdapter().
|
protected |
Definition at line 40 of file class.ilCertificate.php.
|
protected |
Definition at line 54 of file class.ilCertificate.php.
Referenced by __construct().
|
protected |
Definition at line 68 of file class.ilCertificate.php.
Referenced by __construct().
|
protected |
Definition at line 61 of file class.ilCertificate.php.
Referenced by __construct().
|
protected |
Definition at line 47 of file class.ilCertificate.php.
Referenced by __construct().