◆ __construct()
◆ formatNumberString()
ilXlsFoParser::formatNumberString |
( |
string |
$a_number | ) |
|
|
private |
◆ parse()
ilXlsFoParser::parse |
( |
array |
$formData | ) |
|
- Parameters
-
- Returns
- string
- Exceptions
-
Definition at line 78 of file class.ilXlsFoParser.php.
References $params, formatNumberString(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), and ILIAS\Repository\settings().
80 $content =
"<html><body>" . $formData[
'certificate_text'] .
"</body></html>";
81 $content = preg_replace(
"/<p>( ){1,}<\\/p>/",
"<p></p>", $content);
82 $content = preg_replace(
"/<p>(\\s)*?<\\/p>/",
"<p></p>", $content);
83 $content = str_replace([
"<p></p>",
" "], [
"<p class=\"emptyrow\"></p>",
" "], $content);
84 $content = preg_replace(
"//",
"", $content);
86 $this->xmlChecker->parse($content);
87 if ($this->xmlChecker->result()->isError()) {
91 $xsl = $this->certificateXlsFileLoader->getXlsCertificateContent();
95 'font-family="Helvetica, unifont"',
96 'font-family="' . $this->
settings->get(
'rpc_pdf_font',
'Helvetica, unifont') .
'"',
105 if (strcmp($formData[
'pageformat'],
'custom') === 0) {
106 $pageheight = $formData[
'pageheight'] ??
'';
107 $pagewidth = $formData[
'pagewidth'] ??
'';
109 $pageformats = $this->pageFormats->fetchPageFormats();
110 $pageheight = $pageformats[$formData[
'pageformat']][
'height'];
111 $pagewidth = $pageformats[$formData[
'pageformat']][
'width'];
115 'pageheight' => $this->
formatNumberString($this->utilHelper->stripSlashes($pageheight)),
116 'pagewidth' => $this->
formatNumberString($this->utilHelper->stripSlashes($pagewidth)),
117 'backgroundimage' =>
'[BACKGROUND_IMAGE]',
118 'marginbody' => implode(
121 $this->
formatNumberString($this->utilHelper->stripSlashes($formData[
'margin_body'][
'top'])),
122 $this->
formatNumberString($this->utilHelper->stripSlashes($formData[
'margin_body'][
'right'])),
123 $this->
formatNumberString($this->utilHelper->stripSlashes($formData[
'margin_body'][
'bottom'])),
124 $this->
formatNumberString($this->utilHelper->stripSlashes($formData[
'margin_body'][
'left']))
129 return $this->xlstProcess->process($args,
$params);
formatNumberString(string $a_number)
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
◆ $certificateXlsFileLoader
◆ $language
◆ $pageFormats
◆ $settings
◆ $utilHelper
◆ $xlstProcess
◆ $xmlChecker
The documentation for this class was generated from the following file: