ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
ilCertificateGUI Class Reference

GUI class to create PDF certificates. More...

+ Collaboration diagram for ilCertificateGUI:

Public Member Functions

 ilCertificateGUI ($adapter)
 ilCertificateGUI constructor More...
 
executeCommand ()
 execute command More...
 
 getCommand ($cmd)
 Retrieves the ilCtrl command. More...
 
 certificateImport ()
 Import a certificate from a ZIP archive. More...
 
 certificatePreview ()
 Creates a certificate preview. More...
 
 certificateExportFO ()
 Exports the certificate. More...
 
 certificateRemoveBackground ()
 Removes the background image of a certificate. More...
 
 certificateDelete ()
 Deletes the certificate and all its data. More...
 
 certificateDeleteConfirm ()
 Deletes the certificate and all its data. More...
 
 certificateSave ()
 Saves the certificate. More...
 
 certificateUpload ()
 Uploads the certificate. More...
 

Data Fields

 $object
 
 $ctrl
 
 $tree
 
 $ilias
 
 $tpl
 
 $lng
 
 $ref_id
 

Protected Member Functions

 getFormFieldsFromPOST ()
 Get the form values from an HTTP POST. More...
 
 getFormFieldsFromFO ()
 Get the form values from the certificate xsl-fo. More...
 

Detailed Description

GUI class to create PDF certificates.

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Version
$Id$

Definition at line 33 of file class.ilCertificateGUI.php.

Member Function Documentation

◆ certificateDelete()

ilCertificateGUI::certificateDelete ( )

Deletes the certificate and all its data.

Definition at line 167 of file class.ilCertificateGUI.php.

168  {
169  // display confirmation message
170  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
171  $cgui = new ilConfirmationGUI();
172  $cgui->setFormAction($this->ctrl->getFormAction($this, "certificateEditor"));
173  $cgui->setHeaderText($this->lng->txt("certificate_confirm_deletion_text"));
174  $cgui->setCancel($this->lng->txt("no"), "certificateEditor");
175  $cgui->setConfirm($this->lng->txt("yes"), "certificateDeleteConfirm");
176 
177  $this->tpl->setContent($cgui->getHTML());
178  }
Confirmation screen class.

◆ certificateDeleteConfirm()

ilCertificateGUI::certificateDeleteConfirm ( )

Deletes the certificate and all its data.

Definition at line 183 of file class.ilCertificateGUI.php.

184  {
185  $this->object->deleteCertificate();
186  $this->ctrl->redirect($this, "certificateEditor");
187  }

◆ certificateExportFO()

ilCertificateGUI::certificateExportFO ( )

Exports the certificate.

Definition at line 150 of file class.ilCertificateGUI.php.

151  {
152  $this->object->deliverExportFileXML();
153  }

◆ certificateImport()

ilCertificateGUI::certificateImport ( )

Import a certificate from a ZIP archive.

Definition at line 134 of file class.ilCertificateGUI.php.

135  {
136  $this->certificateEditor();
137  }

◆ certificatePreview()

ilCertificateGUI::certificatePreview ( )

Creates a certificate preview.

Definition at line 142 of file class.ilCertificateGUI.php.

143  {
144  $this->object->createPreview();
145  }

◆ certificateRemoveBackground()

ilCertificateGUI::certificateRemoveBackground ( )

Removes the background image of a certificate.

Definition at line 158 of file class.ilCertificateGUI.php.

159  {
160  $this->object->deleteBackgroundImage();
161  $this->certificateEditor();
162  }

◆ certificateSave()

ilCertificateGUI::certificateSave ( )

Saves the certificate.

Definition at line 192 of file class.ilCertificateGUI.php.

193  {
194  $this->certificateEditor();
195  }

◆ certificateUpload()

ilCertificateGUI::certificateUpload ( )

Uploads the certificate.

Definition at line 200 of file class.ilCertificateGUI.php.

201  {
202  $this->certificateEditor();
203  }

◆ executeCommand()

& ilCertificateGUI::executeCommand ( )

execute command

Definition at line 108 of file class.ilCertificateGUI.php.

References $cmd, $ret, and getCommand().

109  {
110  $cmd = $this->ctrl->getCmd();
111  $next_class = $this->ctrl->getNextClass($this);
112 
113  $cmd = $this->getCommand($cmd);
114  switch($next_class)
115  {
116  default:
117  $ret =& $this->$cmd();
118  break;
119  }
120  return $ret;
121  }
getCommand($cmd)
Retrieves the ilCtrl command.
$cmd
Definition: sahs_server.php:35
+ Here is the call graph for this function:

◆ getCommand()

ilCertificateGUI::getCommand (   $cmd)

Retrieves the ilCtrl command.

Definition at line 126 of file class.ilCertificateGUI.php.

References $cmd.

Referenced by executeCommand().

127  {
128  return $cmd;
129  }
$cmd
Definition: sahs_server.php:35
+ Here is the caller graph for this function:

◆ getFormFieldsFromFO()

ilCertificateGUI::getFormFieldsFromFO ( )
protected

Get the form values from the certificate xsl-fo.

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

References $_GET, $_POST, $certificate, $preview, $result, ilObjCertificateSettingsAccess\getBackgroundImageThumbPathWeb(), ilCertificate\getCustomCertificateFields(), getFormFieldsFromPOST(), ilSubmitButton\getInstance(), ilObjCertificateSettingsAccess\hasBackgroundImage(), ilUtil\sendFailure(), ilUtil\sendSuccess(), ilCheckboxInputGUI\setChecked(), ilFormPropertyGUI\setRequired(), ilWACSignedPath\setTokenMaxLifetimeInSeconds(), ilTextInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), and ilWACSignedPath\signFile().

229  {
230  $form_fields = $this->object->getFormFieldsFromFO();
231  $form_fields["active"] = $this->object->readActive();
232  $this->object->getAdapter()->addFormFieldsFromObject($form_fields);
233  return $form_fields;
234  }
+ Here is the call graph for this function:

◆ getFormFieldsFromPOST()

ilCertificateGUI::getFormFieldsFromPOST ( )
protected

Get the form values from an HTTP POST.

Definition at line 208 of file class.ilCertificateGUI.php.

References $_POST, and ilUtil\stripSlashes().

Referenced by getFormFieldsFromFO().

209  {
210  $form_fields = array(
211  "pageformat" => ilUtil::stripSlashes($_POST["pageformat"]),
212  "margin_body_top" => ilUtil::stripSlashes($_POST["margin_body"]["top"]),
213  "margin_body_right" => ilUtil::stripSlashes($_POST["margin_body"]["right"]),
214  "margin_body_bottom" => ilUtil::stripSlashes($_POST["margin_body"]["bottom"]),
215  "margin_body_left" => ilUtil::stripSlashes($_POST["margin_body"]["left"]),
216  "certificate_text" => ilUtil::stripSlashes($_POST["certificate_text"], FALSE),
217  "pageheight" => ilUtil::stripSlashes($_POST["pageheight"]),
218  "pagewidth" => ilUtil::stripSlashes($_POST["pagewidth"]),
219  "active" => ilUtil::stripSlashes($_POST["active"])
220  );
221  $this->object->getAdapter()->addFormFieldsFromPOST($form_fields);
222  return $form_fields;
223  }
$_POST['username']
Definition: cron.php:12
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ilCertificateGUI()

ilCertificateGUI::ilCertificateGUI (   $adapter)

ilCertificateGUI constructor

Parameters
object$a_objectA reference to the test container object public

Definition at line 90 of file class.ilCertificateGUI.php.

References $_GET, $ilCtrl, $ilias, $lng, $tpl, and $tree.

91  {
92  global $lng, $tpl, $ilCtrl, $ilias, $tree;
93 
94  include_once "./Services/Certificate/classes/class.ilCertificate.php";
95  $this->object = new ilCertificate($adapter);
96  $this->lng =& $lng;
97  $this->tpl =& $tpl;
98  $this->ctrl =& $ilCtrl;
99  $this->ilias =& $ilias;
100  $this->tree =& $tree;
101  $this->ref_id = $_GET["ref_id"];
102  $this->lng->loadLanguageModule("certificate");
103  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
Create PDF certificates.

Field Documentation

◆ $ctrl

ilCertificateGUI::$ctrl

Definition at line 47 of file class.ilCertificateGUI.php.

◆ $ilias

ilCertificateGUI::$ilias

Definition at line 61 of file class.ilCertificateGUI.php.

Referenced by ilCertificateGUI().

◆ $lng

ilCertificateGUI::$lng

Definition at line 75 of file class.ilCertificateGUI.php.

Referenced by ilCertificateGUI().

◆ $object

ilCertificateGUI::$object

Definition at line 40 of file class.ilCertificateGUI.php.

◆ $ref_id

ilCertificateGUI::$ref_id

Definition at line 82 of file class.ilCertificateGUI.php.

◆ $tpl

ilCertificateGUI::$tpl

Definition at line 68 of file class.ilCertificateGUI.php.

Referenced by ilCertificateGUI().

◆ $tree

ilCertificateGUI::$tree

Definition at line 54 of file class.ilCertificateGUI.php.

Referenced by ilCertificateGUI().


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