ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilPageFormats.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 final public const DEFAULT_MARGIN_BODY_TOP = '0cm';
24 final public const DEFAULT_MARGIN_BODY_RIGHT = '2cm';
25 final public const DEFAULT_MARGIN_BODY_BOTTOM = '0cm';
26 final public const DEFAULT_MARGIN_BODY_LEFT = '2cm';
27
28 public function __construct(private readonly ilLanguage $language)
29 {
30 }
31
35 public function fetchPageFormats(): array
36 {
37 return [
38 'a4' => [
39 'name' => $this->language->txt('certificate_a4'), // (297 mm x 210 mm)
40 'value' => 'a4',
41 'width' => '210mm',
42 'height' => '297mm'
43 ],
44 'a4landscape' => [
45 'name' => $this->language->txt('certificate_a4_landscape'), // (210 mm x 297 mm)',
46 'value' => 'a4landscape',
47 'width' => '297mm',
48 'height' => '210mm'
49 ],
50 'a5' => [
51 'name' => $this->language->txt('certificate_a5'), // (210 mm x 148.5 mm)
52 'value' => 'a5',
53 'width' => '148mm',
54 'height' => '210mm'
55 ],
56 'a5landscape' => [
57 'name' => $this->language->txt('certificate_a5_landscape'), // (148.5 mm x 210 mm)
58 'value' => 'a5landscape',
59 'width' => '210mm',
60 'height' => '148mm'
61 ],
62 'letter' => [
63 'name' => $this->language->txt('certificate_letter'), // (11 inch x 8.5 inch)
64 'value' => 'letter',
65 'width' => '8.5in',
66 'height' => '11in'
67 ],
68 'letterlandscape' => [
69 'name' => $this->language->txt('certificate_letter_landscape'), // (8.5 inch x 11 inch)
70 'value' => 'letterlandscape',
71 'width' => '11in',
72 'height' => '8.5in'
73 ],
74 'custom' => [
75 'name' => $this->language->txt('certificate_custom'),
76 'value' => 'custom',
77 'width' => '',
78 'height' => ''
79 ]
80 ];
81 }
82}
language handling
final const DEFAULT_MARGIN_BODY_RIGHT
final const DEFAULT_MARGIN_BODY_BOTTOM
final const DEFAULT_MARGIN_BODY_TOP
__construct(private readonly ilLanguage $language)
final const DEFAULT_MARGIN_BODY_LEFT