ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
class.PrintViewProvider.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Notes
;
22
23
use
ILIAS\Export
;
24
use
ilPropertyFormGUI
;
25
29
class
PrintViewProvider
extends
Export\AbstractPrintViewProvider
30
{
31
protected \ilLanguage
$lng
;
32
protected \ilCtrl
$ctrl
;
33
34
public
function
__construct
(
35
) {
36
global
$DIC
;
37
38
$this->
ctrl
= $DIC->ctrl();
39
$this->
lng
= $DIC->language();
40
}
41
42
public
function
getTemplateInjectors
(): array
43
{
44
return
[
45
static
function
(
\ilGlobalTemplate
$tpl):
void
{
46
//$tpl add js/css
47
}
48
];
49
}
50
51
public
function
getSelectionForm
(): ?
ilPropertyFormGUI
52
{
53
$lng
=
$this->lng
;
54
$ilCtrl = $this->ctrl;
55
56
$form = new \ilPropertyFormGUI();
57
58
$form->addCommandButton(
"printView"
,
$lng
->txt(
"print_view"
));
59
60
//$form->setTitle($lng->txt("svy_print_selection"));
61
$form->setFormAction(
"#"
);
62
63
return
$form;
64
}
65
66
public
function
getOnSubmitCode
(): string
67
{
68
return
"event.preventDefault(); "
.
69
"window.setTimeout(() => { window.print();}, 500);"
;
70
}
71
}
ILIAS\Export\AbstractPrintViewProvider
Definition:
class.AbstractPrintViewProvider.php:27
ILIAS\Notes\PrintViewProvider\getOnSubmitCode
getOnSubmitCode()
Definition:
class.PrintViewProvider.php:66
ILIAS\Notes\PrintViewProvider\getTemplateInjectors
getTemplateInjectors()
@inheritDoc
Definition:
class.PrintViewProvider.php:42
ILIAS\Notes\PrintViewProvider\getSelectionForm
getSelectionForm()
@inheritDoc
Definition:
class.PrintViewProvider.php:51
ILIAS\Notes\PrintViewProvider\$lng
ilLanguage $lng
Definition:
class.PrintViewProvider.php:31
ILIAS\Notes\PrintViewProvider\$ctrl
ilCtrl $ctrl
Definition:
class.PrintViewProvider.php:32
ILIAS\Notes\PrintViewProvider\__construct
__construct()
Definition:
class.PrintViewProvider.php:34
ilGlobalTemplate
special template class to simplify handling of ITX/PEAR
Definition:
class.ilGlobalTemplate.php:30
ilPropertyFormGUI
This class represents a property form user interface.
Definition:
class.ilPropertyFormGUI.php:32
ILIAS\Export\PrintViewProvider
Definition:
interface.PrintViewProvider.php:27
ILIAS\Export
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS\Notes
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.Context.php:21
ILIAS\Repository\ctrl
ctrl()
Definition:
trait.GlobalDICGUIServices.php:63
ILIAS\Repository\lng
lng()
Definition:
trait.GlobalDICDomainServices.php:61
$lng
global $lng
Definition:
privfeed.php:31
$DIC
global $DIC
Definition:
shib_login.php:26
components
ILIAS
Notes
Print
class.PrintViewProvider.php
Generated on Sat Oct 18 2025 23:03:30 for ILIAS by
1.9.4 (using
Doxyfile
)