ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
ilDclTableViewEditFormGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilDclTableViewEditFormGUI:
+ Collaboration diagram for ilDclTableViewEditFormGUI:

Public Member Functions

 __construct (ilDclTableViewEditGUI $parent_gui, ilDclTableView $tableview, ?ilDclTable $table=null)
 
 updateTableView ()
 
 createTableView ()
 
- Public Member Functions inherited from ilPropertyFormGUI
 __construct ()
 
 executeCommand ()
 
 setTableWidth (string $a_width)
 
 getTableWidth ()
 
 setMode (string $a_mode)
 
 getMode ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setTitleIcon (string $a_titleicon)
 
 getTitleIcon ()
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setShowTopButtons (bool $a_val)
 
 getShowTopButtons ()
 
 setForceTopButtons (bool $a_val)
 
 getForceTopButtons ()
 
 addItem ($a_item)
 
 removeItemByPostVar (string $a_post_var, bool $a_remove_unused_headers=false)
 
 getItemByPostVar (string $a_post_var)
 
 setItems (array $a_items)
 
 getItems ()
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage (bool $a_val)
 
 getDisableStandardMessage ()
 
 getHideLabels ()
 
 setHideLabels (bool $a_value=true)
 
 setValuesByArray (array $a_values, bool $a_restrict_to_value_keys=false)
 
 setValuesByPost ()
 
 checkInput ()
 
 getInput (string $a_post_var, bool $ensureValidation=true)
 Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-POST variable, identified by the passed postvar. More...
 
 addCommandButton (string $a_cmd, string $a_text, string $a_id="")
 
 getCommandButtons ()
 
 clearCommandButtons ()
 
 getContent ()
 
 insertItem ( $item, bool $a_sub_item=false)
 
 addAsyncOnloadCode (string $code)
 
 getHTML ()
 
 getHTMLAsync ()
 
 getFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 
 moveFileUpload (string $a_target_directory, string $a_field, ?string $a_target_name=null, ?string $a_index=null, ?string $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction (string $a_formaction)
 
 getFormAction ()
 
 setTarget (string $a_target)
 
 getTarget ()
 
 setMultipart (bool $a_multipart)
 
 getMultipart ()
 
 setId (string $a_id)
 
 getId ()
 
 setName (string $a_name)
 
 getName ()
 
 setKeepOpen (bool $a_keepopen)
 
 getKeepOpen ()
 
 setOpenTag (bool $a_open)
 
 getOpenTag ()
 
 setCloseTag (bool $a_val)
 
 getCloseTag ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 getHTML ()
 
 getContent ()
 

Protected Member Functions

 initForm ()
 
- Protected Member Functions inherited from ilPropertyFormGUI
 getRequestedPostVar ()
 
 getFileHash ()
 
 hideRequired (string $a_type)
 
 appendOnloadCode (string $html)
 
 rebuildUploadedFiles ()
 

Protected Attributes

ilDclTableView $tableview
 
ilDclTable $table = null
 
ilDclTableViewEditGUI $parent_gui
 
- Protected Attributes inherited from ilPropertyFormGUI
bool $required_text = false
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTemplate $tpl
 
ilObjUser $user = null
 
ilSetting $settings = null
 
string $mode = "std"
 
bool $check_input_called = false
 
bool $disable_standard_message = false
 
string $top_anchor = "il_form_top"
 
string $title = ''
 
string $titleicon = ""
 
string $description = ""
 
string $tbl_width = ""
 
bool $show_top_buttons = true
 
bool $hide_labels = false
 
bool $force_top_buttons = false
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
ilGlobalTemplateInterface $global_tpl = null
 
 $onload_code = []
 
- Protected Attributes inherited from ilFormGUI
string $formaction = ""
 
bool $multipart = false
 
bool $keepopen = false
 
bool $opentag = true
 
string $id = ''
 
string $name = ''
 
string $target = ''
 
bool $prevent_double_submission = false
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Definition at line 19 of file class.ilDclTableViewEditFormGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilDclTableViewEditFormGUI::__construct ( ilDclTableViewEditGUI  $parent_gui,
ilDclTableView  $tableview,
?ilDclTable  $table = null 
)

Definition at line 25 of file class.ilDclTableViewEditFormGUI.php.

26 {
27 global $DIC;
28 $lng = $DIC['lng'];
29 $ilCtrl = $DIC['ilCtrl'];
31 $this->lng = $lng;
32 $this->ctrl = $ilCtrl;
33 $this->parent_gui = $parent_gui;
34 $this->tableview = $tableview;
35 $this->table = $table;
36 $this->ctrl->saveParameterByClass('ilDclTableViewGUI', 'tableview_id');
37 $this->initForm();
38 }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ilPropertyFormGUI\$lng, $parent_gui, $table, $tableview, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), initForm(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ createTableView()

ilDclTableViewEditFormGUI::createTableView ( )

Definition at line 90 of file class.ilDclTableViewEditFormGUI.php.

90 : void
91 {
92 $this->tableview->setTitle($this->getInput('title'));
93 $this->tableview->setDescription($this->getInput('description'));
94 $this->tableview->setRoles((array) $this->getInput('roles'));
95 $this->tableview->setTableId($this->table->getId());
96 $this->tableview->setStepVs(true);
97 $this->tableview->setStepE(false);
98 $this->tableview->setStepC(false);
99 $this->tableview->setStepO(false);
100 $this->tableview->setStepS(false);
101 $this->tableview->setOrder($this->table->getNewTableviewOrder());
102 $this->tableview->create();
103
104 $this->ctrl->setParameterByClass('ilDclTableViewGUI', 'tableview_id', $this->tableview->getId());
105
106 $this->global_tpl->setOnScreenMessage('success', $this->lng->txt('dcl_msg_tableview_created'), true);
107 }
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...

References ILIAS\Repository\ctrl(), ilPropertyFormGUI\getInput(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ initForm()

ilDclTableViewEditFormGUI::initForm ( )
protected

Definition at line 40 of file class.ilDclTableViewEditFormGUI.php.

40 : void
41 {
42 global $DIC;
43 $rbacreview = $DIC['rbacreview'];
44
45 $this->setTitle($this->tableview->getId() ? $this->lng->txt('dcl_view_settings') : $this->lng->txt('dcl_tableview_add'));
46
47 //title
48 $item = new ilTextInputGUI($this->lng->txt('title'), 'title');
49 $item->setValue($this->tableview->getTitle());
50 $item->setRequired(true);
51 $this->addItem($item);
52
53 //description
54 $item = new ilTextInputGUI($this->lng->txt('description'), 'description');
55 $item->setValue($this->tableview->getDescription());
56 $this->addItem($item);
57
58 //roles
59 $checkbox_group_input_gui = new ilCheckboxGroupInputGUI($this->lng->txt('roles'), 'roles');
60
61 $ref_id = $this->http->wrapper()->query()->retrieve('ref_id', $this->refinery->kindlyTo()->int());
62 foreach ($rbacreview->getParentRoleIds($ref_id) as $role_array) {
63 $option = new ilCheckboxOption(ilObjRole::_getTranslation($role_array['title']));
64 $option->setValue($role_array['obj_id']);
65 $checkbox_group_input_gui->addOption($option);
66 }
67
68 $checkbox_group_input_gui->setValue($this->tableview->getRoles());
69 $this->addItem($checkbox_group_input_gui);
70
71 $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
72 if ($this->tableview->getId()) {
73 $this->addCommandButton('update', $this->lng->txt('save'));
74 } else {
75 $this->addCommandButton('create', $this->lng->txt('create'));
76 }
77 $this->addCommandButton('cancel', $this->lng->txt('cancel'));
78 }
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...
setFormAction(string $a_formaction)
static _getTranslation(string $a_role_title)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
This class represents a text property in a property form.
$ref_id
Definition: ltiauth.php:67
static http()
Fetches the global http state from ILIAS.

References $DIC, $ref_id, ilObjRole\_getTranslation(), ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

Referenced by __construct().

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

◆ updateTableView()

ilDclTableViewEditFormGUI::updateTableView ( )

Definition at line 80 of file class.ilDclTableViewEditFormGUI.php.

80 : void
81 {
82 $this->tableview->setTitle($this->getInput('title'));
83 $this->tableview->setDescription($this->getInput('description'));
84 $this->tableview->setRoles((array) $this->getInput('roles'));
85 $this->tableview->update();
86
87 $this->global_tpl->setOnScreenMessage('success', $this->lng->txt('dcl_msg_tableview_updated'), true);
88 }

References ilPropertyFormGUI\getInput(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Field Documentation

◆ $parent_gui

ilDclTableViewEditGUI ilDclTableViewEditFormGUI::$parent_gui
protected

Definition at line 23 of file class.ilDclTableViewEditFormGUI.php.

Referenced by __construct().

◆ $table

ilDclTable ilDclTableViewEditFormGUI::$table = null
protected

Definition at line 22 of file class.ilDclTableViewEditFormGUI.php.

Referenced by __construct().

◆ $tableview

ilDclTableView ilDclTableViewEditFormGUI::$tableview
protected

Definition at line 21 of file class.ilDclTableViewEditFormGUI.php.

Referenced by __construct().


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