ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilWkhtmlToPdfConfigFormGUI.php
Go to the documentation of this file.
1<?php
2
4{
8 protected $lng;
9
13 public function __construct()
14 {
15 global $DIC;
16 $this->setLanguage($DIC['lng']);
17 }
18
22 protected function setLanguage($lng)
23 {
24 $this->lng = $lng;
25 }
26
30 public function addConfigForm($form)
31 {
32 $path = new ilTextInputGUI($this->translate('path'), 'path');
33 $form->addItem($path);
34
35 $this->appendOutputOptionsForm($form);
36 $this->appendPageSettingsForm($form);
37 }
38
43 protected function translate($txt)
44 {
45 return $this->lng->txt($txt);
46 }
47
52 {
53 $section_header = new ilFormSectionHeaderGUI();
54 $section_header->setTitle($this->translate('output_options'));
55 $form->addItem($section_header);
56
57 $form->addItem($this->buildExternalLinksForm());
58 $form->addItem($this->buildEnableFormsForm());
59 $form->addItem($this->buildLowQualityForm());
60 $form->addItem($this->buildGreyScaleForm());
61 $form->addItem($this->buildPrintMediaTypeForm());
62 $form->addItem($this->buildJavascriptDelayForm());
63 $form->addItem($this->buildCheckboxSvgForm());
64 $form->addItem($this->buildCheckedCheckboxSvgForm());
65 $form->addItem($this->buildRadiobuttonSvgForm());
67 $form->addItem($this->buildOverwriteDefaultFont());
68 }
69
73 protected function buildExternalLinksForm()
74 {
75 $external_links = new ilCheckboxInputGUI($this->translate('external_links'), 'external_links');
76 $external_links->setInfo($this->translate('external_links_info'));
77 return $external_links;
78 }
79
83 protected function buildEnableFormsForm()
84 {
85 $enable_forms = new ilCheckboxInputGUI($this->translate('enable_forms'), 'enable_forms');
86 $enable_forms->setInfo($this->translate('enable_forms_info'));
87 return $enable_forms;
88 }
89
93 protected function buildLowQualityForm()
94 {
95 $low_quality = new ilCheckboxInputGUI($this->translate('low_quality'), 'low_quality');
96 $low_quality->setInfo($this->translate('low_quality_info'));
97 return $low_quality;
98 }
99
103 protected function buildGreyScaleForm()
104 {
105 $grey_scale = new ilCheckboxInputGUI($this->translate('greyscale'), 'greyscale');
106 $grey_scale->setInfo($this->translate('greyscale_info'));
107 return $grey_scale;
108 }
109
113 protected function buildPrintMediaTypeForm()
114 {
115 $print_media = new ilCheckboxInputGUI($this->translate('print_media_type'), 'print_media_type');
116 $print_media->setInfo($this->translate('print_media_info'));
117 return $print_media;
118 }
119
123 protected function buildJavascriptDelayForm()
124 {
125 $javascript_delay = new ilNumberInputGUI($this->translate('javascript_delay'), 'javascript_delay');
126 $javascript_delay->setMinValue(0);
127 $javascript_delay->setInfo($this->translate('javascript_delay_info'));
128 return $javascript_delay;
129 }
130
134 protected function buildOverwriteDefaultFont()
135 {
136 $overwrite_font = new ilSelectInputGUI($this->translate('overwrite_font'), 'overwrite_font');
137 $overwrite_font->setOptions(ilPDFGenerationConstants::getFontStyles());
138 return $overwrite_font;
139 }
140
145 {
146 $section_header = new ilFormSectionHeaderGUI();
147 $section_header->setTitle($this->translate('page_settings'));
148 $form->addItem($section_header);
149
150 $form->addItem($this->buildZoomForm());
151 $form->addItem($this->buildOrientationsForm());
152 $form->addItem($this->buildPageSizesForm());
153 $form->addItem($this->buildMarginLeftForm());
154 $form->addItem($this->buildMarginRightForm());
155 $form->addItem($this->buildMarginTopForm());
156 $form->addItem($this->buildMarginBottomForm());
157 $form->addItem($this->buildHeaderForm());
158 $form->addItem($this->buildFooterForm());
159 }
160
164 protected function buildZoomForm()
165 {
166 return new ilNumberInputGUI($this->translate('zoom'), 'zoom');
167 }
168
172 protected function buildOrientationsForm()
173 {
174 $orientation = new ilSelectInputGUI($this->translate('orientation'), 'orientation');
175 $orientation->setOptions(ilPDFGenerationConstants::getOrientations());
176 return $orientation;
177 }
178
182 protected function buildPageSizesForm()
183 {
184 $page_size = new ilSelectInputGUI($this->translate('page_size'), 'page_size');
185 $page_size->setOptions(ilPDFGenerationConstants::getPageSizesNames());
186 return $page_size;
187 }
188
192 protected function buildMarginLeftForm()
193 {
194 $margin_left = new ilTextInputGUI($this->translate('margin_left'), 'margin_left');
195 $margin_left->setValidationRegexp('/(\d)+?(\W)*(cm|mm)$/');
196 $margin_left->setInfo($this->translate('margin_info'));
197 return $margin_left;
198 }
199
203 protected function buildMarginRightForm()
204 {
205 $margin_right = new ilTextInputGUI($this->translate('margin_right'), 'margin_right');
206 $margin_right->setValidationRegexp('/(\d)+?(\W)*(cm|mm)$/');
207 $margin_right->setInfo($this->translate('margin_info'));
208 return $margin_right;
209 }
210
214 protected function buildMarginTopForm()
215 {
216 $margin_top = new ilTextInputGUI($this->translate('margin_top'), 'margin_top');
217 $margin_top->setValidationRegexp('/(\d)+?(\W)*(cm|mm)$/');
218 $margin_top->setInfo($this->translate('margin_info'));
219 return $margin_top;
220 }
221
225 protected function buildMarginBottomForm()
226 {
227 $margin_bottom = new ilTextInputGUI($this->translate('margin_bottom'), 'margin_bottom');
228 $margin_bottom->setValidationRegexp('/(\d)+?(\W)*(cm|mm)$/');
229 $margin_bottom->setInfo($this->translate('margin_info'));
230 return $margin_bottom;
231 }
232
236 protected function buildHeaderForm()
237 {
238 $header_select = new ilRadioGroupInputGUI($this->translate('header_type'), 'header_select');
239 $header_select->addOption(new ilRadioOption($this->translate('none'), ilPDFGenerationConstants::HEADER_NONE, ''));
240 $header_select->addOption($this->buildHeaderTextForm());
241 $header_select->addOption($this->buildHeaderHtmlForm());
242
243 return $header_select;
244 }
245
249 protected function buildHeaderTextForm()
250 {
251 $header_text_option = new ilRadioOption($this->translate('text'), ilPDFGenerationConstants::HEADER_TEXT, '');
252
253 $header_text_left = new ilTextInputGUI($this->translate('header_text_left'), 'head_text_left');
254 $header_text_option->addSubItem($header_text_left);
255
256 $header_text_center = new ilTextInputGUI($this->translate('header_text_center'), 'head_text_center');
257 $header_text_option->addSubItem($header_text_center);
258
259 $header_text_right = new ilTextInputGUI($this->translate('header_text_right'), 'head_text_right');
260 $header_text_option->addSubItem($header_text_right);
261
262 $head_text_spacing = new ilTextInputGUI($this->translate('spacing'), 'head_text_spacing');
263 $header_text_option->addSubItem($head_text_spacing);
264
265 $head_text_line = new ilCheckboxInputGUI($this->translate('header_line'), 'head_text_line');
266
267 $header_text_option->addSubItem($head_text_line);
268 return $header_text_option;
269 }
270
274 protected function buildHeaderHtmlForm()
275 {
276 $header_html_option = new ilRadioOption($this->translate("html"), ilPDFGenerationConstants::HEADER_HTML, '');
277
278 $header_html = new ilTextInputGUI($this->translate('html'), 'head_html');
279 $header_html_option->addSubItem($header_html);
280
281 $head_html_spacing = new ilTextInputGUI($this->translate('spacing'), 'head_html_spacing');
282 $header_html_option->addSubItem($head_html_spacing);
283
284 $head_html_line = new ilCheckboxInputGUI($this->translate('header_line'), 'head_html_line');
285 $header_html_option->addSubItem($head_html_line);
286 return $header_html_option;
287 }
288
292 protected function buildFooterForm()
293 {
294 $footer_select = new ilRadioGroupInputGUI($this->translate('footer_type'), 'footer_select');
295 $footer_select->addOption(new ilRadioOption($this->translate("none"), ilPDFGenerationConstants::FOOTER_NONE, ''));
296 $footer_select->addOption($this->buildFooterTextForm());
297 $footer_select->addOption($this->buildFooterHtmlForm());
298
299 return $footer_select;
300 }
301
305 protected function buildFooterTextForm()
306 {
307 $footer_text_option = new ilRadioOption($this->translate('text'), ilPDFGenerationConstants::FOOTER_TEXT, '');
308
309 $footer_text_left = new ilTextInputGUI($this->translate('footer_text_left'), 'footer_text_left');
310 $footer_text_option->addSubItem($footer_text_left);
311
312 $footer_text_center = new ilTextInputGUI($this->translate('footer_text_center'), 'footer_text_center');
313 $footer_text_option->addSubItem($footer_text_center);
314
315 $footer_text_right = new ilTextInputGUI($this->translate('footer_text_right'), 'footer_text_right');
316 $footer_text_option->addSubItem($footer_text_right);
317
318 $footer_text_spacing = new ilTextInputGUI($this->translate('spacing'), 'footer_text_spacing');
319 $footer_text_option->addSubItem($footer_text_spacing);
320
321 $footer_text_line = new ilCheckboxInputGUI($this->translate('footer_line'), 'footer_text_line');
322
323 $footer_text_option->addSubItem($footer_text_line);
324 return $footer_text_option;
325 }
326
330 protected function buildFooterHtmlForm()
331 {
332 $footer_html_option = new ilRadioOption($this->translate('html'), ilPDFGenerationConstants::FOOTER_HTML, '');
333
334 $footer_html = new ilTextInputGUI($this->translate('footer_html'), 'footer_html');
335 $footer_html_option->addSubItem($footer_html);
336
337 $footer_html_spacing = new ilTextInputGUI($this->translate('spacing'), 'footer_html_spacing');
338 $footer_html_option->addSubItem($footer_html_spacing);
339
340 $footer_html_line = new ilCheckboxInputGUI($this->translate('footer_line'), 'footer_html_line');
341 $footer_html_option->addSubItem($footer_html_line);
342 return $footer_html_option;
343 }
344
346 {
347 return new ilTextInputGUI($this->translate('checkbox_svg'), 'checkbox_svg');
348 }
349
351 {
352 return new ilTextInputGUI($this->translate('checkbox_checked_svg'), 'checkbox_checked_svg');
353 }
354
356 {
357 return new ilTextInputGUI($this->translate('radio_button_svg'), 'radio_button_svg');
358 }
359
361 {
362 return new ilTextInputGUI($this->translate('radio_button_checked_svg'), 'radio_button_checked_svg');
363 }
364
368 public function validateForm()
369 {
370 $everything_ok = true;
372 $path = realpath(ilUtil::escapeShellCmd($_POST['path']));
373 $config->setPath($path);
374 $orientation = ilUtil::stripSlashes($_POST['orientation']);
375 $margin_left = ilUtil::stripSlashes($_POST['margin_left']);
376 $margin_right = ilUtil::stripSlashes($_POST['margin_right']);
377 $margin_top = ilUtil::stripSlashes($_POST['margin_top']);
378 $margin_bottom = ilUtil::stripSlashes($_POST['margin_bottom']);
379 $footer_text_spacing = (int) $_POST['footer_text_spacing'];
380 $footer_html_spacing = (int) $_POST['footer_html_spacing'];
381 $head_text_spacing = (int) $_POST['head_text_spacing'];
382 $head_html_spacing = (int) $_POST['head_html_spacing'];
383 $footer_text_left = ilUtil::stripSlashes($_POST['footer_text_left']);
384 $footer_text_center = ilUtil::stripSlashes($_POST['footer_text_center']);
385 $footer_text_right = ilUtil::stripSlashes($_POST['footer_text_right']);
386 $header_text_left = ilUtil::stripSlashes($_POST['head_text_left']);
387 $header_text_center = ilUtil::stripSlashes($_POST['head_text_center']);
388 $header_text_right = ilUtil::stripSlashes($_POST['head_text_right']);
389 $sizes = [
390 $margin_left, $margin_right, $margin_top, $margin_bottom, $footer_text_spacing, $footer_html_spacing, $head_text_spacing, $head_html_spacing
391 ];
392 $header_footer_texts = [
393 $footer_text_left, $footer_text_center, $footer_text_right, $header_text_left, $header_text_center, $header_text_right
394 ];
395 if (mb_stripos($config->getPath(), 'wkhtmlto') === false) {
396 ilUtil::sendFailure($this->lng->txt("file_not_found"), true);
397 $everything_ok = false;
398 } elseif(!in_array($orientation, ilPDFGenerationConstants::getOrientations()))
399 {
400 $everything_ok = false;
401 } elseif($this->isNotValidSize($sizes))
402 {
403 $everything_ok = false;
404 } elseif($this->isNotValidText($header_footer_texts))
405 {
406 $everything_ok = false;
407 }
408 else {
409 $config->setZoom((float) $_POST['zoom']);
410 $config->setExternalLinks((int) $_POST['external_links']);
411 $config->setEnabledForms((int) $_POST['enable_forms']);
412 $config->setLowQuality((int) $_POST['low_quality']);
413 $config->setGreyscale((int) $_POST['greyscale']);
414 $config->setOrientation($orientation);
415 $config->setPageSize(ilUtil::stripSlashes($_POST['page_size']));
416 $config->setMarginLeft(ilUtil::stripSlashes($_POST['margin_left']));
417 $config->setMarginRight(ilUtil::stripSlashes($_POST['margin_right']));
418 $config->setMarginTop(ilUtil::stripSlashes($_POST['margin_top']));
419 $config->setMarginBottom(ilUtil::stripSlashes($_POST['margin_bottom']));
420 $config->setPrintMediaType((int) $_POST['print_media_type']);
421 $config->setJavascriptDelay((int) $_POST['javascript_delay']);
422 $config->setCheckboxSvg(ilUtil::stripSlashes($_POST['checkbox_svg']));
423 $config->setCheckboxCheckedSvg(ilUtil::stripSlashes($_POST['checkbox_checked_svg']));
424 $config->setRadioButtonSvg(ilUtil::stripSlashes($_POST['radio_button_svg']));
425 $config->setRadioButtonCheckedSvg(ilUtil::stripSlashes($_POST['radio_button_checked_svg']));
426 $config->setHeaderType((int) $_POST['header_select']);
427 $config->setHeaderTextLeft(ilUtil::stripSlashes($header_text_left));
428 $config->setHeaderTextCenter(ilUtil::stripSlashes($header_text_center));
429 $config->setHeaderTextRight(ilUtil::stripSlashes($header_text_right));
430 $config->setHeaderTextSpacing((int) $head_text_spacing);
431 $config->setHeaderTextLine((int) $_POST['head_text_line']);
432 $config->setHeaderHtmlLine((int) $_POST['head_html_line']);
433 $config->setHeaderHtmlSpacing((int) $head_html_spacing);
434 $config->setHeaderHtml(ilUtil::stripSlashes($_POST['head_html']));
435 $config->setFooterType((int) $_POST['footer_select']);
436 $config->setFooterTextLeft($footer_text_left);
437 $config->setFooterTextCenter($footer_text_center);
438 $config->setFooterTextRight($footer_text_right);
439 $config->setFooterTextSpacing($footer_text_spacing);
440 $config->setFooterTextLine((int) $_POST['footer_text_line']);
441 $config->setFooterHtmlLine((int) $_POST['footer_html_line']);
442 $config->setFooterHtmlSpacing((int) $footer_html_spacing);
443 $config->setFooterHtml(ilUtil::stripSlashes($_POST['footer_html']));
444 $config->setOverwriteDefaultFont(strtolower(ilUtil::stripSlashes($_POST['overwrite_font'])));
445 $this->saveNewDefaultBinaryPath($config->getPath());
446 }
447
448 return $everything_ok;
449 }
450
451 private function isNotValidSize(array $sizes) {
452 foreach($sizes as $size) {
453 if(! preg_match('/(\d)+?(\W)*(cm|mm)$/', $size)){
454 if($size !== 0 && $size !== null && $size !== "") {
455 return true;
456 }
457 }
458 }
459
460 return false;
461 }
462
463 private function isNotValidText(array $texts) {
464 foreach($texts as $text) {
465 if(! preg_match('/[a-zA-Z\d ]+$/', $text)){
466 if($text !== '' && $text !== null && $text !== "") {
467 return true;
468 }
469 }
470 }
471
472 return false;
473 }
477 protected function saveNewDefaultBinaryPath($path){
478 $settings = new ilSetting('wkhtmltopdfrenderer');
479 $settings->set('path', $path);
480 }
481
487 {
488 $orientation = ilUtil::stripSlashes($form->getItemByPostVar('orientation')->getValue());
489 if(!in_array($orientation, ilPDFGenerationConstants::getOrientations())){
490 $orientation = 'Portrait';
491 }
492 $purifier = new ilHtmlForumPostPurifier();
493 return array(
494 'path' => ilUtil::stripSlashes($form->getItemByPostVar('path')->getValue()),
495 'zoom' => (float) $form->getItemByPostVar('zoom')->getValue(),
496 'external_links' => (int) $form->getItemByPostVar('external_links')->getChecked(),
497 'enable_forms' => (int) $form->getItemByPostVar('enable_forms')->getChecked(),
498 'low_quality' => (int) $form->getItemByPostVar('low_quality')->getChecked(),
499 'greyscale' => (int) $form->getItemByPostVar('greyscale')->getChecked(),
500 'orientation' => $orientation,
501 'page_size' => ilUtil::stripSlashes($form->getItemByPostVar('page_size')->getValue()),
502 'margin_left' => ilUtil::stripSlashes($form->getItemByPostVar('margin_left')->getValue()),
503 'margin_right' => ilUtil::stripSlashes($form->getItemByPostVar('margin_right')->getValue()),
504 'margin_top' => ilUtil::stripSlashes($form->getItemByPostVar('margin_top')->getValue()),
505 'margin_bottom' => ilUtil::stripSlashes($form->getItemByPostVar('margin_bottom')->getValue()),
506 'print_media_type' => (int) $form->getItemByPostVar('print_media_type')->getChecked(),
507 'javascript_delay' => (int) $form->getItemByPostVar('javascript_delay')->getValue(),
508 'checkbox_svg' => $purifier->purify(ilUtil::stripSlashes($form->getItemByPostVar('checkbox_svg')->getValue())),
509 'checkbox_checked_svg' => $purifier->purify(ilUtil::stripSlashes($form->getItemByPostVar('checkbox_checked_svg')->getValue())),
510 'radio_button_svg' => $purifier->purify(ilUtil::stripSlashes($form->getItemByPostVar('radio_button_svg')->getValue())),
511 'radio_button_checked_svg' => $purifier->purify(ilUtil::stripSlashes($form->getItemByPostVar('radio_button_checked_svg')->getValue())),
512 'header_select' => (int) $form->getItemByPostVar('header_select')->getValue(),
513 'head_text_left' => $purifier->purify(ilUtil::stripSlashes($form->getItemByPostVar('head_text_left')->getValue())),
514 'head_text_center' => $purifier->purify(ilUtil::stripSlashes($form->getItemByPostVar('head_text_center')->getValue())),
515 'head_text_right' => $purifier->purify(ilUtil::stripSlashes($form->getItemByPostVar('head_text_right')->getValue())),
516 'head_text_spacing' => ilUtil::stripSlashes($form->getItemByPostVar('head_text_spacing')->getValue()),
517 'head_text_line' => ilUtil::stripSlashes($form->getItemByPostVar('head_text_line')->getValue()),
518 'head_html_line' => (int) $form->getItemByPostVar('head_html_line')->getValue(),
519 'head_html_spacing' => (int) $form->getItemByPostVar('head_html_spacing')->getValue(),
520 'head_html' => $purifier->purify(ilUtil::stripSlashes($form->getItemByPostVar('head_html')->getValue())),
521 'footer_select' => ilUtil::stripSlashes($form->getItemByPostVar('footer_select')->getValue()),
522 'footer_text_left' => $purifier->purify(ilUtil::stripSlashes($form->getItemByPostVar('footer_text_left')->getValue())),
523 'footer_text_right' => $purifier->purify(ilUtil::stripSlashes($form->getItemByPostVar('footer_text_right')->getValue())),
524 'footer_text_spacing' => ilUtil::stripSlashes($form->getItemByPostVar('footer_text_spacing')->getValue()),
525 'footer_text_center' => $purifier->purify(ilUtil::stripSlashes($form->getItemByPostVar('footer_text_center')->getValue())),
526 'footer_text_line' => (int) $form->getItemByPostVar('footer_text_line')->getValue(),
527 'footer_html' => $purifier->purify(ilUtil::stripSlashes($form->getItemByPostVar('footer_html')->getValue())),
528 'footer_html_spacing' => (int) $form->getItemByPostVar('footer_html_spacing')->getValue(),
529 'overwrite_font' => strtolower(ilUtil::stripSlashes($form->getItemByPostVar('overwrite_font')->getValue()))
530 );
531 }
532
537 public function populateForm($form, $config)
538 {
539 $form->getItemByPostVar('path')->setValue($config->getWKHTMLToPdfDefaultPath());
540 $form->getItemByPostVar('zoom')->setValue($config->getZoom());
541 $form->getItemByPostVar('external_links')->setValue(1);
542 $form->getItemByPostVar('external_links')->setChecked($config->getExternalLinks());
543 $form->getItemByPostVar('enable_forms')->setValue(1);
544 $form->getItemByPostVar('enable_forms')->setChecked($config->getEnabledForms());
545 $form->getItemByPostVar('low_quality')->setValue(1);
546 $form->getItemByPostVar('low_quality')->setChecked($config->getLowQuality());
547 $form->getItemByPostVar('greyscale')->setValue(1);
548 $form->getItemByPostVar('greyscale')->setChecked($config->getGreyscale());
549 $form->getItemByPostVar('orientation')->setValue($config->getOrientation());
550 $form->getItemByPostVar('page_size')->setValue($config->getPageSize());
551 $form->getItemByPostVar('margin_left')->setValue($config->getMarginLeft());
552 $form->getItemByPostVar('margin_right')->setValue($config->getMarginRight());
553 $form->getItemByPostVar('margin_top')->setValue($config->getMarginTop());
554 $form->getItemByPostVar('margin_bottom')->setValue($config->getMarginBottom());
555 $form->getItemByPostVar('print_media_type')->setValue(1);
556 $form->getItemByPostVar('print_media_type')->setChecked($config->getPrintMediaType());
557 $form->getItemByPostVar('javascript_delay')->setValue($config->getJavascriptDelay());
558 $form->getItemByPostVar('checkbox_svg')->setValue($config->getCheckboxSvg());
559 $form->getItemByPostVar('checkbox_checked_svg')->setValue($config->getCheckboxCheckedSvg());
560 $form->getItemByPostVar('radio_button_svg')->setValue($config->getRadioButtonSvg());
561 $form->getItemByPostVar('radio_button_checked_svg')->setValue($config->getRadioButtonCheckedSvg());
562 $form->getItemByPostVar('header_select')->setValue($config->getHeaderType());
563 $form->getItemByPostVar('head_text_left')->setValue($config->getHeaderTextLeft());
564 $form->getItemByPostVar('head_text_center')->setValue($config->getHeaderTextCenter());
565 $form->getItemByPostVar('head_text_right')->setValue($config->getHeaderTextRight());
566 $form->getItemByPostVar('head_text_spacing')->setValue($config->getHeaderTextSpacing());
567 $form->getItemByPostVar('head_text_line')->setValue(1);
568 $form->getItemByPostVar('head_text_line')->setChecked($config->isHeaderTextLine());
569 $form->getItemByPostVar('head_html_line')->setValue(1);
570 $form->getItemByPostVar('head_html_line')->setChecked($config->isHeaderHtmlLine());
571 $form->getItemByPostVar('head_html_spacing')->setValue($config->getHeaderHtmlSpacing());
572 $form->getItemByPostVar('head_html')->setValue($config->getHeaderHtml());
573 $form->getItemByPostVar('footer_select')->setValue($config->getFooterType());
574 $form->getItemByPostVar('footer_text_left')->setValue($config->getFooterTextLeft());
575 $form->getItemByPostVar('footer_text_center')->setValue($config->getFooterTextCenter());
576 $form->getItemByPostVar('footer_text_right')->setValue($config->getFooterTextRight());
577 $form->getItemByPostVar('footer_text_spacing')->setValue($config->getFooterTextSpacing());
578 $form->getItemByPostVar('footer_text_line')->setValue(1);
579 $form->getItemByPostVar('footer_text_line')->setChecked($config->isFooterTextLine());
580 $form->getItemByPostVar('footer_html_line')->setValue(1);
581 $form->getItemByPostVar('footer_html_line')->setChecked($config->isFooterHtmlLine());
582 $form->getItemByPostVar('footer_html')->setValue($config->getFooterHtml());
583 $form->getItemByPostVar('footer_html_spacing')->setValue($config->getFooterHtmlSpacing());
584 $form->getItemByPostVar('overwrite_font')->setValue($config->getOverwriteDefaultFont(false));
585
587 }
588}
$size
Definition: RandomTest.php:84
$_POST["username"]
An exception for terminatinating execution or to throw for unit testing.
This class represents a checkbox property in a property form.
This class represents a section header in a property form.
Concrete class for sanitizing html of forum posts.
This class represents a number property in a property form.
static setCheckedIfTrue(\ilPropertyFormGUI $form)
This class represents a property form user interface.
addItem($a_item)
Add Item (Property, SectionHeader).
getItemByPostVar($a_post_var)
Get Item by POST variable.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a selection list property in a property form.
ILIAS Setting Class.
This class represents a text property in a property form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static escapeShellCmd($a_arg)
escape shell cmd
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
__construct()
ilWkhtmlToPdfConfigFormGUI constructor.
appendOutputOptionsForm(ilPropertyFormGUI $form)
$txt
Definition: error.php:13
global $DIC
Definition: goto.php:24
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68