Definition at line 21 of file class.ilXlsFoParser.php.
◆ __construct()
◆ formatNumberString()
ilXlsFoParser::formatNumberString |
( |
string |
$a_number | ) |
|
|
private |
◆ parse()
ilXlsFoParser::parse |
( |
array |
$formData | ) |
|
- Parameters
-
array{"certificate_text" | string, "pageformat": string, "pagewidth"?: string, "pageheight"?: string, "margin_body": array{"top": string, "right": string, "bottom": string, "left": string}} $formData |
Definition at line 68 of file class.ilXlsFoParser.php.
References $params, formatNumberString(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), and ILIAS\Repository\settings().
70 $content =
"<html><body>" . $formData[
'certificate_text'] .
"</body></html>";
71 $content = preg_replace(
"/<p>( ){1,}<\\/p>/",
"<p></p>", $content);
72 $content = preg_replace(
"/<p>(\\s)*?<\\/p>/",
"<p></p>", $content);
73 $content = str_replace(
"<p></p>",
"<p class=\"emptyrow\"></p>", $content);
74 $content = str_replace(
" ",
" ", $content);
75 $content = str_replace(
'<br>',
'<br/>', $content);
76 $content = preg_replace(
"//",
"", $content);
78 $this->xmlChecker->parse($content);
79 if ($this->xmlChecker->result()->isError()) {
83 $xsl = $this->certificateXlsFileLoader->getXlsCertificateContent();
87 'font-family="Helvetica, unifont"',
88 'font-family="' . $this->
settings->get(
'rpc_pdf_font',
'Helvetica, unifont') .
'"',
97 if (strcmp($formData[
'pageformat'],
'custom') === 0) {
98 $pageheight = $formData[
'pageheight'] ??
'';
99 $pagewidth = $formData[
'pagewidth'] ??
'';
101 $pageformats = $this->pageFormats->fetchPageFormats();
102 $pageheight = $pageformats[$formData[
'pageformat']][
'height'];
103 $pagewidth = $pageformats[$formData[
'pageformat']][
'width'];
107 'pageheight' => $this->
formatNumberString($this->utilHelper->stripSlashes($pageheight)),
108 'pagewidth' => $this->
formatNumberString($this->utilHelper->stripSlashes($pagewidth)),
109 'backgroundimage' =>
'[BACKGROUND_IMAGE]',
110 'marginbody' => implode(
113 $this->
formatNumberString($this->utilHelper->stripSlashes($formData[
'margin_body'][
'top'])),
114 $this->
formatNumberString($this->utilHelper->stripSlashes($formData[
'margin_body'][
'right'])),
115 $this->
formatNumberString($this->utilHelper->stripSlashes($formData[
'margin_body'][
'bottom'])),
116 $this->
formatNumberString($this->utilHelper->stripSlashes($formData[
'margin_body'][
'left']))
121 return $this->xlstProcess->process($args,
$params);
formatNumberString(string $a_number)
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
language()
description: > Example for rendring a language glyph.
◆ $certificateXlsFileLoader
◆ $language
◆ $utilHelper
◆ $xlstProcess
◆ $xmlChecker
The documentation for this class was generated from the following file: