|
ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Create PDF certificates. More...
Collaboration diagram for ilCertificate:Public Member Functions | |
| __construct (ilCertificateAdapter $adapter) | |
| ilCertificate constructor More... | |
| formatNumberString ($a_number) | |
| getBackgroundImagePath ($asRelative=false) | |
| Returns the filesystem path of the background image. More... | |
| getBackgroundImageName () | |
| Returns the filename of the background image. More... | |
| getBackgroundImageThumbPath () | |
| Returns the filesystem path of the background image thumbnail. More... | |
| getBackgroundImageTempfilePath () | |
| Returns the filesystem path of the background image temp file during upload. More... | |
| getXSLPath () | |
| Returns the filesystem path of the XSL-FO file. More... | |
| getXSLName () | |
| Returns the filename of the XSL-FO file. More... | |
| getBackgroundImagePathWeb () | |
| Returns the web path of the background image. More... | |
| getBackgroundImageThumbPathWeb () | |
| Returns the web path of the background image thumbnail. More... | |
| deleteBackgroundImage () | |
| Deletes the background image of a certificate. More... | |
| cloneCertificate ($newObject) | |
| Clone the certificate for another test object. More... | |
| deleteCertificate () | |
| Deletes the certificate and all it's data. More... | |
| getFormFieldsFromFO () | |
| Convert the XSL-FO to the certificate text and the form settings using XSL transformation. More... | |
| processXHTML2FO ($form_data, $for_export=false) | |
| Convert the certificate text to XSL-FO using XSL transformation. More... | |
| outCertificate ($params, $deliver=true) | |
| Creates a PDF certificate. More... | |
| createPreview () | |
| Creates a PDF preview of the XSL-FO certificate. More... | |
| saveCertificate ($xslfo, $filename="") | |
| Saves the XSL-FO code to a file. More... | |
| uploadBackgroundImage ($image_tempfilename) | |
| Uploads a background image for the certificate. More... | |
| hasBackgroundImage () | |
| Checks for the background image of the certificate. More... | |
| isComplete () | |
| Checks the status of the certificate. More... | |
| getPageFormats () | |
| Retrieves predefined page formats. More... | |
| deliverExportFileXML () | |
| Builds an export file in ZIP format and delivers it. More... | |
| importCertificate ($zipfile, $filename) | |
| Reads an import ZIP file and creates a certificate of it. More... | |
| getAdapter () | |
| Gets the adapter. More... | |
| setAdapter ($adapter) | |
| Sets the adapter. More... | |
| createArchiveDirectory () | |
| addPDFtoArchiveDirectory ($pdfdata, $dir, $filename) | |
| Adds PDF data as a file to a given directory. More... | |
| zipCertificatesInArchiveDirectory ($dir, $deliver=true) | |
| Create a ZIP file from a directory with certificates. More... | |
| readActive () | |
| writeActive ($a_value) | |
| getExchangeContent () | |
| outCertificateWithGivenContentAndVariables ($content, array $insert_tags) | |
Static Public Member Functions | |
| static | _getXSLName () |
| Returns the filename of the XSL-FO file. More... | |
| static | _isComplete ($adapter) |
| Checks the status of the certificate. More... | |
| static | isActive () |
| static | isObjectActive ($a_obj_id) |
| static | getCustomCertificateFields () |
| Get custom certificate fields. More... | |
Protected Attributes | |
| $ctrl | |
| $tree | |
| $ilias | |
| $lng | |
| $adapter | |
| $settings | |
| $log | |
| $db | |
Static Protected Attributes | |
| static | $is_active |
Private Member Functions | |
| exchangeCertificateVariables ($certificate_text, $insert_tags=array()) | |
| Exchanges the variables in the certificate text with given values. More... | |
Create PDF certificates.
Base class to create PDF certificates using XML-FO XML transformations
Definition at line 15 of file class.ilCertificate.php.
| ilCertificate::__construct | ( | ilCertificateAdapter | $adapter | ) |
ilCertificate constructor
| ilCertificateAdapter | $adapter | The certificate adapter needed to construct the certificate |
Definition at line 76 of file class.ilCertificate.php.
References $adapter, $DIC, and settings().
Here is the call graph for this function:
|
static |
Returns the filename of the XSL-FO file.
Definition at line 173 of file class.ilCertificate.php.
Referenced by _isComplete().
Here is the caller graph for this function:
|
static |
Checks the status of the certificate.
| object | $adapter | The certificate adapter |
Definition at line 624 of file class.ilCertificate.php.
References $adapter, and _getXSLName().
Referenced by ilCourseVerificationTableGUI\getItems(), ilExerciseVerificationTableGUI\getItems(), ilSCORMVerificationTableGUI\getItems(), and ilObjExerciseGUI\showOverviewObject().
Here is the call graph for this function:
Here is the caller graph for this function:| 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 837 of file class.ilCertificate.php.
| ilCertificate::cloneCertificate | ( | $newObject | ) |
Clone the certificate for another test object.
| $newObject | The new certificate object |
Definition at line 228 of file class.ilCertificate.php.
References getAdapter(), getBackgroundImagePath(), getBackgroundImageThumbPath(), getXSLPath(), ilUtil\makeDirParents(), and readActive().
Here is the call graph for this function:| ilCertificate::createArchiveDirectory | ( | ) |
Definition at line 822 of file class.ilCertificate.php.
Referenced by deliverExportFileXML(), and importCertificate().
Here is the caller graph for this function:| ilCertificate::createPreview | ( | ) |
Creates a PDF preview of the XSL-FO certificate.
Definition at line 498 of file class.ilCertificate.php.
References ilUtil\deliverData(), exchangeCertificateVariables(), ilRpcClientFactory\factory(), ilMathJax\getInstance(), getXSLPath(), ilMathJax\PURPOSE_PDF, ilMathJax\RENDER_PNG_AS_FO_FILE, and ilDatePresentation\setUseRelativeDates().
Here is the call graph for this function:| ilCertificate::deleteBackgroundImage | ( | ) |
Deletes the background image of a certificate.
Definition at line 208 of file class.ilCertificate.php.
References $result, getBackgroundImagePath(), getBackgroundImageTempfilePath(), and getBackgroundImageThumbPath().
Here is the call graph for this function:| ilCertificate::deleteCertificate | ( | ) |
Deletes the certificate and all it's data.
@access public
Definition at line 262 of file class.ilCertificate.php.
References ilUtil\delDir(), getAdapter(), and writeActive().
Here is the call graph for this function:| ilCertificate::deliverExportFileXML | ( | ) |
Builds an export file in ZIP format and delivers it.
Definition at line 701 of file class.ilCertificate.php.
References createArchiveDirectory(), ilUtil\delDir(), ilUtil\deliverFile(), getAdapter(), getBackgroundImageName(), ilObjCertificateSettingsAccess\getBackgroundImageName(), getBackgroundImagePath(), ilObjCertificateSettingsAccess\getBackgroundImagePath(), getXSLName(), getXSLPath(), hasBackgroundImage(), ilObjCertificateSettingsAccess\hasBackgroundImage(), ilUtil\makeDir(), saveCertificate(), and ilUtil\zip().
Here is the call graph for this function:
|
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 432 of file class.ilCertificate.php.
References getAdapter(), and ilUtil\prepareFormOutput().
Referenced by createPreview(), and outCertificate().
Here is the call graph for this function:
Here is the caller graph for this function:| ilCertificate::formatNumberString | ( | $a_number | ) |
| string | $a_number |
Definition at line 95 of file class.ilCertificate.php.
| ilCertificate::getAdapter | ( | ) |
Gets the adapter.
Definition at line 798 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().
Here is the caller graph for this function:| ilCertificate::getBackgroundImageName | ( | ) |
Returns the filename of the background image.
Definition at line 123 of file class.ilCertificate.php.
Referenced by deliverExportFileXML(), getBackgroundImagePath(), getBackgroundImagePathWeb(), getBackgroundImageThumbPath(), and uploadBackgroundImage().
Here is the caller graph for this function:| ilCertificate::getBackgroundImagePath | ( | $asRelative = false | ) |
Returns the filesystem path of the background image.
| bool | $asRelative |
Definition at line 105 of file class.ilCertificate.php.
References getAdapter(), and getBackgroundImageName().
Referenced by cloneCertificate(), deleteBackgroundImage(), deliverExportFileXML(), hasBackgroundImage(), importCertificate(), processXHTML2FO(), and uploadBackgroundImage().
Here is the call graph for this function:
Here is the caller graph for this function:| ilCertificate::getBackgroundImagePathWeb | ( | ) |
Returns the web path of the background image.
Definition at line 183 of file class.ilCertificate.php.
References getAdapter(), getBackgroundImageName(), and ilUtil\removeTrailingPathSeparators().
Here is the call graph for this function:| ilCertificate::getBackgroundImageTempfilePath | ( | ) |
Returns the filesystem path of the background image temp file during upload.
Definition at line 143 of file class.ilCertificate.php.
References getAdapter().
Referenced by deleteBackgroundImage(), and uploadBackgroundImage().
Here is the call graph for this function:
Here is the caller graph for this function:| ilCertificate::getBackgroundImageThumbPath | ( | ) |
Returns the filesystem path of the background image thumbnail.
Definition at line 133 of file class.ilCertificate.php.
References getAdapter(), and getBackgroundImageName().
Referenced by cloneCertificate(), deleteBackgroundImage(), getBackgroundImageThumbPathWeb(), importCertificate(), and uploadBackgroundImage().
Here is the call graph for this function:
Here is the caller graph for this function:| ilCertificate::getBackgroundImageThumbPathWeb | ( | ) |
Returns the web path of the background image thumbnail.
Definition at line 196 of file class.ilCertificate.php.
References getBackgroundImageThumbPath(), and ilUtil\removeTrailingPathSeparators().
Here is the call graph for this function:
|
static |
Get custom certificate fields.
Definition at line 972 of file class.ilCertificate.php.
Referenced by ilCertificateGUI\certificateEditor().
Here is the caller graph for this function:| ilCertificate::getExchangeContent | ( | ) |
Definition at line 991 of file class.ilCertificate.php.
| ilCertificate::getFormFieldsFromFO | ( | ) |
Convert the XSL-FO to the certificate text and the form settings using XSL transformation.
Definition at line 275 of file class.ilCertificate.php.
References $output, getAdapter(), getXSLPath(), xslt_create(), xslt_error(), and xslt_free().
Here is the call graph for this function:| ilCertificate::getPageFormats | ( | ) |
Retrieves predefined page formats.
Definition at line 650 of file class.ilCertificate.php.
Referenced by processXHTML2FO().
Here is the caller graph for this function:| ilCertificate::getXSLName | ( | ) |
Returns the filename of the XSL-FO file.
Definition at line 163 of file class.ilCertificate.php.
Referenced by deliverExportFileXML(), and getXSLPath().
Here is the caller graph for this function:| ilCertificate::getXSLPath | ( | ) |
Returns the filesystem path of the XSL-FO file.
Definition at line 153 of file class.ilCertificate.php.
References getAdapter(), and getXSLName().
Referenced by cloneCertificate(), createPreview(), deliverExportFileXML(), getFormFieldsFromFO(), isComplete(), outCertificate(), and saveCertificate().
Here is the call graph for this function:
Here is the caller graph for this function:| 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().
Here is the call graph for this function:
Here is the caller graph for this function:| ilCertificate::importCertificate | ( | $zipfile, | |
| $filename | |||
| ) |
Reads an import ZIP file and creates a certificate of it.
Definition at line 730 of file class.ilCertificate.php.
References $file, $filename, ilUtil\convertImage(), createArchiveDirectory(), ilUtil\delDir(), getAdapter(), getBackgroundImagePath(), getBackgroundImageThumbPath(), ilUtil\getDir(), saveCertificate(), and ilUtil\unzip().
Here is the call graph for this function:
|
static |
Definition at line 862 of file class.ilCertificate.php.
Referenced by ilCourseParticipantsTableGUI\__construct(), ilObjSAHSLearningModuleAccess\_lookupUserCertificate(), ilCourseCertificateAdapter\_preloadListData(), ilObjCourseGUI\deliverCertificateObject(), ilPCPlaceHolderGUI\getAvailableTypes(), ilSCORMVerificationTableGUI\getItems(), ilObjExercise\hasUserCertificate(), ilObjCourseGUI\initHeaderAction(), ilObjExerciseGUI\setSettingsSubTabs(), ilObjSAHSLearningModuleGUI\setSettingsSubTabs(), and ilObjCourseGUI\setSubTabs().
Here is the caller graph for this function:| ilCertificate::isComplete | ( | ) |
Checks the status of the certificate.
Definition at line 602 of file class.ilCertificate.php.
References getAdapter(), and getXSLPath().
Here is the call graph for this function:
|
static |
| int | $a_obj_id |
Definition at line 884 of file class.ilCertificate.php.
Referenced by ilCourseParticipantsTableGUI\__construct(), ilObjSAHSLearningModuleAccess\_lookupUserCertificate(), ilObjCourseGUI\deliverCertificateObject(), ilObjExercise\hasUserCertificate(), and ilObjCourseGUI\initHeaderAction().
Here is the caller graph for this function:| ilCertificate::outCertificate | ( | $params, | |
$deliver = true |
|||
| ) |
Creates a PDF certificate.
| array | $params | An array of parameters which is needed to create the certificate |
| bool | $deliver |
Definition at line 455 of file class.ilCertificate.php.
References $params, ilUtil\deliverData(), exchangeCertificateVariables(), ilRpcClientFactory\factory(), getAdapter(), ilMathJax\getInstance(), getXSLPath(), ilUtil\prepareFormOutput(), ilMathJax\PURPOSE_PDF, ilMathJax\RENDER_PNG_AS_FO_FILE, and ilDatePresentation\setUseRelativeDates().
Here is the call graph for this function:| ilCertificate::outCertificateWithGivenContentAndVariables | ( | $content, | |
| array | $insert_tags | ||
| ) |
| string | $content | |
| array | $insert_tags |
| Exception |
Definition at line 1024 of file class.ilCertificate.php.
| 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 368 of file class.ilCertificate.php.
References $output, $params, getBackgroundImagePath(), ilObjCertificateSettingsAccess\getBackgroundImagePath(), getPageFormats(), hasBackgroundImage(), ilObjCertificateSettingsAccess\hasBackgroundImage(), settings(), xslt_create(), xslt_error(), and xslt_free().
Here is the call graph for this function:| ilCertificate::readActive | ( | ) |
Definition at line 919 of file class.ilCertificate.php.
Referenced by cloneCertificate().
Here is the caller graph for this function:| ilCertificate::saveCertificate | ( | $xslfo, | |
$filename = "" |
|||
| ) |
Saves the XSL-FO code to a file.
| string | $xslfo | XSL-FO code |
Definition at line 530 of file class.ilCertificate.php.
References $fh, $filename, getAdapter(), getXSLPath(), and ilUtil\makeDirParents().
Referenced by deliverExportFileXML(), and importCertificate().
Here is the call graph for this function:
Here is the caller graph for this function:| ilCertificate::setAdapter | ( | $adapter | ) |
Sets the adapter.
| object | $adapter | Adapter |
Definition at line 808 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 550 of file class.ilCertificate.php.
References ilUtil\convertImage(), getAdapter(), getBackgroundImageName(), getBackgroundImagePath(), getBackgroundImageTempfilePath(), getBackgroundImageThumbPath(), and ilUtil\makeDirParents().
Here is the call graph for this function:| ilCertificate::writeActive | ( | $a_value | ) |
| $a_value | bool |
Definition at line 929 of file class.ilCertificate.php.
Referenced by deleteCertificate().
Here is the caller graph for this function:| 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 851 of file class.ilCertificate.php.
|
protected |
Definition at line 50 of file class.ilCertificate.php.
Referenced by __construct(), _isComplete(), getAdapter(), and setAdapter().
|
protected |
Definition at line 22 of file class.ilCertificate.php.
|
protected |
Definition at line 65 of file class.ilCertificate.php.
|
protected |
Definition at line 36 of file class.ilCertificate.php.
|
staticprotected |
Definition at line 70 of file class.ilCertificate.php.
|
protected |
Definition at line 43 of file class.ilCertificate.php.
|
protected |
Definition at line 60 of file class.ilCertificate.php.
|
protected |
Definition at line 55 of file class.ilCertificate.php.
|
protected |
Definition at line 29 of file class.ilCertificate.php.