ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.PrintViewProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Notes;
22
23use ILIAS\Export;
25
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
52 {
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}
special template class to simplify handling of ITX/PEAR
This class represents a property form user interface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26