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 = preg_replace(
"//",
"", $content);
77 $this->xmlChecker->parse($content);
78 if ($this->xmlChecker->result()->isError()) {
82 $xsl = $this->certificateXlsFileLoader->getXlsCertificateContent();
86 'font-family="Helvetica, unifont"',
87 'font-family="' . $this->
settings->get(
'rpc_pdf_font',
'Helvetica, unifont') .
'"',
96 if (strcmp($formData[
'pageformat'],
'custom') === 0) {
97 $pageheight = $formData[
'pageheight'] ??
'';
98 $pagewidth = $formData[
'pagewidth'] ??
'';
100 $pageformats = $this->pageFormats->fetchPageFormats();
101 $pageheight = $pageformats[$formData[
'pageformat']][
'height'];
102 $pagewidth = $pageformats[$formData[
'pageformat']][
'width'];
106 'pageheight' => $this->
formatNumberString($this->utilHelper->stripSlashes($pageheight)),
107 'pagewidth' => $this->
formatNumberString($this->utilHelper->stripSlashes($pagewidth)),
108 'backgroundimage' =>
'[BACKGROUND_IMAGE]',
109 'marginbody' => implode(
112 $this->
formatNumberString($this->utilHelper->stripSlashes($formData[
'margin_body'][
'top'])),
113 $this->
formatNumberString($this->utilHelper->stripSlashes($formData[
'margin_body'][
'right'])),
114 $this->
formatNumberString($this->utilHelper->stripSlashes($formData[
'margin_body'][
'bottom'])),
115 $this->
formatNumberString($this->utilHelper->stripSlashes($formData[
'margin_body'][
'left']))
120 return $this->xlstProcess->process($args,
$params);
formatNumberString(string $a_number)
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
◆ $certificateXlsFileLoader
◆ $language
◆ $utilHelper
◆ $xlstProcess
◆ $xmlChecker
The documentation for this class was generated from the following file: