ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Notes\PrintViewProvider Class Reference
+ Inheritance diagram for ILIAS\Notes\PrintViewProvider:
+ Collaboration diagram for ILIAS\Notes\PrintViewProvider:

Public Member Functions

 __construct ()
 
 getTemplateInjectors ()
 
 getSelectionForm ()
 form which is featured in the modal form target is modified to open in new window (not yet possible with ks forms) the print/pdf message is added automatically More...
 
 getOnSubmitCode ()
 
- Public Member Functions inherited from ILIAS\Export\AbstractPrintViewProvider
 setOffline (bool $offline)
 Set output mode. More...
 
 getOnSubmitCode ()
 
 autoPageBreak ()
 
 getSelectionForm ()
 
 getPages ()
 
 getTemplateInjectors ()
 

Protected Attributes

ilLanguage $lng
 
ilCtrl $ctrl
 
- Protected Attributes inherited from ILIAS\Export\AbstractPrintViewProvider
 $offline = false
 

Additional Inherited Members

- Data Fields inherited from ILIAS\Export\AbstractPrintViewProvider
const PRINT = "print"
 
const OFFLINE = "offline"
 
- Protected Member Functions inherited from ILIAS\Export\AbstractPrintViewProvider
 getOutputMode ()
 Get output mode. More...
 

Detailed Description

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 29 of file class.PrintViewProvider.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Notes\PrintViewProvider::__construct ( )

Definition at line 34 of file class.PrintViewProvider.php.

References $DIC, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

35  {
36  global $DIC;
37 
38  $this->ctrl = $DIC->ctrl();
39  $this->lng = $DIC->language();
40  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ getOnSubmitCode()

ILIAS\Notes\PrintViewProvider::getOnSubmitCode ( )

Implements ILIAS\Export\PrintViewProvider.

Definition at line 66 of file class.PrintViewProvider.php.

66  : string
67  {
68  return "event.preventDefault(); " .
69  "window.setTimeout(() => { window.print();}, 500);";
70  }

◆ getSelectionForm()

ILIAS\Notes\PrintViewProvider::getSelectionForm ( )

form which is featured in the modal form target is modified to open in new window (not yet possible with ks forms) the print/pdf message is added automatically

Returns
ilPropertyFormGUI|null

Implements ILIAS\Export\PrintViewProvider.

Definition at line 51 of file class.PrintViewProvider.php.

References ILIAS\Notes\PrintViewProvider\$ctrl, and ILIAS\Notes\PrintViewProvider\$lng.

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  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...

◆ getTemplateInjectors()

ILIAS\Notes\PrintViewProvider::getTemplateInjectors ( )
Returns
callable[] each callable gets the $tpl passed to inject css/js/...

Implements ILIAS\Export\PrintViewProvider.

Definition at line 42 of file class.PrintViewProvider.php.

42  : array
43  {
44  return [
45  static function (\ilGlobalTemplate $tpl): void {
46  //$tpl add js/css
47  }
48  ];
49  }
special template class to simplify handling of ITX/PEAR

Field Documentation

◆ $ctrl

ilCtrl ILIAS\Notes\PrintViewProvider::$ctrl
protected

◆ $lng

ilLanguage ILIAS\Notes\PrintViewProvider::$lng
protected

The documentation for this class was generated from the following file: