ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilDclTableViewEditFormGUI Class Reference
+ 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 ()
 
 checkForRequiredField ()
 

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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

28  {
29  global $DIC;
30  $lng = $DIC['lng'];
31  $ilCtrl = $DIC['ilCtrl'];
33  $this->lng = $lng;
34  $this->ctrl = $ilCtrl;
35  $this->parent_gui = $parent_gui;
36  $this->tableview = $tableview;
37  $this->table = $table;
38  $this->ctrl->saveParameterByClass('ilDclTableViewGUI', 'tableview_id');
39  $this->initForm();
40  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ createTableView()

ilDclTableViewEditFormGUI::createTableView ( )

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

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

92  : void
93  {
94  $this->tableview->setTitle($this->getInput('title'));
95  $this->tableview->setDescription($this->getInput('description'));
96  $this->tableview->setRoles((array) $this->getInput('roles'));
97  $this->tableview->setTableId($this->table->getId());
98  $this->tableview->setOrder($this->table->getNewTableviewOrder());
99  $this->tableview->create();
100 
101  $this->ctrl->setParameterByClass('ilDclTableViewGUI', 'tableview_id', $this->tableview->getId());
102 
103  $this->global_tpl->setOnScreenMessage('success', $this->lng->txt('dcl_msg_tableview_created'), true);
104  }
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-...
+ Here is the call graph for this function:

◆ initForm()

ilDclTableViewEditFormGUI::initForm ( )
protected

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

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().

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

◆ updateTableView()

ilDclTableViewEditFormGUI::updateTableView ( )

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

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

82  : void
83  {
84  $this->tableview->setTitle($this->getInput('title'));
85  $this->tableview->setDescription($this->getInput('description'));
86  $this->tableview->setRoles((array) $this->getInput('roles'));
87  $this->tableview->update();
88 
89  $this->global_tpl->setOnScreenMessage('success', $this->lng->txt('dcl_msg_tableview_updated'), true);
90  }
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-...
+ Here is the call graph for this function:

Field Documentation

◆ $parent_gui

ilDclTableViewEditGUI ilDclTableViewEditFormGUI::$parent_gui
protected

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

Referenced by __construct().

◆ $table

ilDclTable ilDclTableViewEditFormGUI::$table = null
protected

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

Referenced by __construct().

◆ $tableview

ilDclTableView ilDclTableViewEditFormGUI::$tableview
protected

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

Referenced by __construct().


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