ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ILIAS\Administration\JavaServerGUI Class Reference

GUI for Java Server Settings. More...

+ Collaboration diagram for ILIAS\Administration\JavaServerGUI:

Public Member Functions

 __construct (private ilCtrl $ctrl, private ilGlobalTemplateInterface $tpl, private ilLanguage $lng, private Setting $settings, private bool $has_write_access)
 
 executeCommand ()
 
 view ()
 
 update ()
 
 buildForm ()
 

Detailed Description

GUI for Java Server Settings.

@ilCtrl_isCalledBy ILIAS\Administration\JavaServerGUI: ilObjServerInfoGUI

Definition at line 35 of file JavaServerGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Administration\JavaServerGUI::__construct ( private ilCtrl  $ctrl,
private ilGlobalTemplateInterface  $tpl,
private ilLanguage  $lng,
private Setting  $settings,
private bool  $has_write_access 
)

Definition at line 37 of file JavaServerGUI.php.

43 {
44 }

Member Function Documentation

◆ buildForm()

ILIAS\Administration\JavaServerGUI::buildForm ( )

Definition at line 79 of file JavaServerGUI.php.

80 {
81 $form = new ilPropertyFormGUI();
82 $form->setFormAction($this->ctrl->getFormAction($this, 'update'));
83
84 // pdf fonts
85 $pdf = new ilFormSectionHeaderGUI();
86 $pdf->setTitle($this->lng->txt('rpc_pdf_generation'));
87 $form->addItem($pdf);
88
89 $pdf_font = new ilTextInputGUI($this->lng->txt('rpc_pdf_font'), 'rpc_pdf_font');
90 $pdf_font->setInfo($this->lng->txt('rpc_pdf_font_info'));
91 $pdf_font->setSize(64);
92 $pdf_font->setMaxLength(1024);
93 $pdf_font->setRequired(true);
94 $pdf_font->setValue($this->settings->get('rpc_pdf_font', 'Helvetica, unifont'));
95 $form->addItem($pdf_font);
96
97 if ($this->has_write_access) {
98 $form->addCommandButton("update", $this->lng->txt("save"));
99 }
100 return $form;
101 }
This class represents a section header in a property form.
This class represents a property form user interface.
This class represents a text property in a property form.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\settings().

Referenced by ILIAS\Administration\JavaServerGUI\update(), and ILIAS\Administration\JavaServerGUI\view().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ILIAS\Administration\JavaServerGUI::executeCommand ( )

Definition at line 46 of file JavaServerGUI.php.

47 {
48 $cmd = $this->ctrl->getCmd("view");
49 switch ($cmd) {
50 case 'view':
51 $this->view();
52 break;
53
54 case 'update':
55 if ($this->has_write_access) {
56 $this->update();
57 }
58 break;
59 }
60 }

References ILIAS\Repository\ctrl(), ILIAS\Administration\JavaServerGUI\update(), and ILIAS\Administration\JavaServerGUI\view().

+ Here is the call graph for this function:

◆ update()

ILIAS\Administration\JavaServerGUI::update ( )

Definition at line 67 of file JavaServerGUI.php.

67 : void
68 {
69 $form = $this->buildForm();
70 if ($form->checkInput()) {
71 $this->settings->set('rpc_pdf_font', $form->getInput('rpc_pdf_font'));
72 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
73 $this->ctrl->redirect($this);
74 }
75 $form->setValuesByPost();
76 $this->tpl->setContent($form->getHtml());
77 }

References ILIAS\Administration\JavaServerGUI\buildForm(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\settings().

Referenced by ILIAS\Administration\JavaServerGUI\executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ view()

ILIAS\Administration\JavaServerGUI::view ( )

Definition at line 62 of file JavaServerGUI.php.

62 : void
63 {
64 $this->tpl->setContent($this->buildForm()->getHTML());
65 }

References ILIAS\Administration\JavaServerGUI\buildForm().

Referenced by ILIAS\Administration\JavaServerGUI\executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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