ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDclTableViewEditFormGUI Class Reference

Class ilDclTableViewEditFormGUI. 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 ()
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 setTableWidth ($a_width)
 Set table width. More...
 
 getTableWidth ()
 get table width More...
 
 setMode ($a_mode)
 Set Mode ('std', 'subform'). More...
 
 getMode ()
 Get Mode ('std', 'subform'). More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setTitleIcon ($a_titleicon)
 Set TitleIcon. More...
 
 getTitleIcon ()
 Get TitleIcon. More...
 
 setDescription ($a_val)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setTopAnchor ($a_val)
 Set top anchor. More...
 
 getTopAnchor ()
 Get top anchor. More...
 
 setShowTopButtons ($a_val)
 Get show top buttons. More...
 
 getShowTopButtons ()
 Set show top buttons. More...
 
 setForceTopButtons ($a_val)
 Set force top buttons. More...
 
 getForceTopButtons ()
 Get force top buttons. More...
 
 addItem ($a_item)
 Add Item (Property, SectionHeader). More...
 
 removeItemByPostVar ($a_post_var, $a_remove_unused_headers=false)
 Remove Item. More...
 
 getItemByPostVar ($a_post_var)
 Get Item by POST variable. More...
 
 setItems ($a_items)
 Set Items. More...
 
 getItems ()
 Get Items. More...
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage ($a_val)
 Set disable standard message. More...
 
 getDisableStandardMessage ()
 Get disable standard message. More...
 
 getHideLabels ()
 Get a value indicating whether the labels should be hidden or not. More...
 
 setHideLabels ($a_value=true)
 Set a value indicating whether the labels should be hidden or not. More...
 
 setValuesByArray ($a_values, $a_restrict_to_value_keys=false)
 Set form values from an array. More...
 
 setValuesByPost ()
 Set form values from POST values. More...
 
 checkInput ()
 Check Post Input. More...
 
 getInput ($a_post_var, $ensureValidation=true)
 Returns the value of a HTTP-POST variable, identified by the passed id. More...
 
 addCustomProperty ( $a_title, $a_html, $a_info="", $a_alert="", $a_required=false)
 Add a custom property. More...
 
 addCommandButton ($a_cmd, $a_text, $a_id="")
 Add Command button. More...
 
 getCommandButtons ()
 Return all Command buttons. More...
 
 clearCommandButtons ()
 Remove all command buttons. More...
 
 getContent ()
 Get Content. More...
 
 insertItem ($item, $a_sub_item=false)
 
 getHTML ()
 
 getFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Was any file uploaded? More...
 
 moveFileUpload ($a_target_directory, $a_field, $a_target_name=null, $a_index=null, $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction ($a_formaction)
 Set FormAction. More...
 
 getFormAction ()
 Get FormAction. More...
 
 setTarget ($a_target)
 Set Target. More...
 
 getTarget ()
 Get Target. More...
 
 setMultipart ($a_multipart)
 Set Enctype Multipart/Formdata true/false. More...
 
 getMultipart ()
 Get Enctype Multipart/Formdata true/false. More...
 
 setId ($a_id)
 Set Id. More...
 
 getId ()
 Get Id. More...
 
 setName ($a_name)
 Set Name. More...
 
 getName ()
 Get Name. More...
 
 setKeepOpen ($a_keepopen)
 Set Keep Form Tag Open. More...
 
 getKeepOpen ()
 Get Keep Form Tag Open. More...
 
 setOpenTag ($a_open)
 Enable/Disable Open Form Tag. More...
 
 getOpenTag ()
 Get Open Form Tag Enabled. More...
 
 setCloseTag ($a_val)
 Set close tag. More...
 
 getCloseTag ()
 Get close tag. More...
 
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission. More...
 
 getPreventDoubleSubmission ()
 Get prevent double submission. More...
 
 getHTML ()
 Get HTML. More...
 
 getContent ()
 Get Content. More...
 

Protected Member Functions

 initForm ()
 
- Protected Member Functions inherited from ilPropertyFormGUI
 hideRequired ($a_type)
 
 rebuildUploadedFiles ()
 try to rebuild files More...
 

Protected Attributes

 $tableview
 
 $table
 
 $lng
 
 $ctrl
 
 $parent_gui
 
- Protected Attributes inherited from ilPropertyFormGUI
 $lng
 
 $ctrl
 
 $tpl
 
 $user
 
 $settings
 
 $mode = "std"
 
 $check_input_called = false
 
 $disable_standard_message = false
 
 $top_anchor = "il_form_top"
 
 $titleicon = false
 
 $description = ""
 
 $tbl_width = false
 
 $show_top_buttons = true
 
 $hide_labels = false
 
 $force_top_buttons = false
 
- Protected Attributes inherited from ilFormGUI
 $formaction
 
 $multipart = false
 
 $keepopen = false
 
 $opentag = true
 
 $id
 
 $name
 
 $prevent_double_submission = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

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

34  {
35  global $DIC;
36  $lng = $DIC['lng'];
37  $ilCtrl = $DIC['ilCtrl'];
39  $this->lng = $lng;
40  $this->ctrl = $ilCtrl;
41  $this->parent_gui = $parent_gui;
42  $this->tableview = $tableview;
43  $this->table = $table;
44  $this->ctrl->saveParameterByClass('ilDclTableViewGUI', 'tableview_id');
45  $this->initForm();
46  }
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ createTableView()

ilDclTableViewEditFormGUI::createTableView ( )

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

References ilPropertyFormGUI\getInput().

101  {
102  $this->tableview->setTitle($this->getInput('title'));
103  $this->tableview->setDescription($this->getInput('description'));
104  $this->tableview->setRoles((array) $this->getInput('roles'));
105  $this->tableview->setTableId($this->table->getId());
106  $this->tableview->setStepVs(true);
107  $this->tableview->setStepE(false);
108  $this->tableview->setStepC(false);
109  $this->tableview->setStepO(false);
110  $this->tableview->setStepS(false);
111  $this->tableview->setOrder($this->table->getNewTableviewOrder());
112  $this->tableview->create();
113 
114  $this->ctrl->setParameterByClass('ilDclTableViewGUI', 'tableview_id', $this->tableview->getId());
115 
116  ilUtil::sendSuccess($this->lng->txt('dcl_msg_tableview_created'), true);
117  }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
+ Here is the call graph for this function:

◆ initForm()

ilDclTableViewEditFormGUI::initForm ( )
protected

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

References $_GET, $DIC, ilObjRole\_getTranslation(), ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

Referenced by __construct().

50  {
51  global $DIC;
52  $rbacreview = $DIC['rbacreview'];
53 
54  $this->setTitle($this->tableview->getId() ? $this->lng->txt('dcl_view_settings') : $this->lng->txt('dcl_tableview_add'));
55 
56  //title
57  $item = new ilTextInputGUI($this->lng->txt('title'), 'title');
58  $item->setValue($this->tableview->getTitle());
59  $item->setRequired(true);
60  $this->addItem($item);
61 
62  //description
63  $item = new ilTextInputGUI($this->lng->txt('description'), 'description');
64  $item->setValue($this->tableview->getDescription());
65  $this->addItem($item);
66 
67  //roles
68  $checkbox_group_input_gui = new ilCheckboxGroupInputGUI($this->lng->txt('roles'), 'roles');
69 
70  foreach ($rbacreview->getParentRoleIds($_GET['ref_id']) as $role_array) {
71  $option = new ilCheckboxOption(ilObjRole::_getTranslation($role_array['title'], $role_array['obj_id']));
72  $option->setValue($role_array['obj_id']);
73  $checkbox_group_input_gui->addOption($option);
74  }
75 
76  $checkbox_group_input_gui->setValue($this->tableview->getRoles());
77  $this->addItem($checkbox_group_input_gui);
78 
79  $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
80  if ($this->tableview->getId()) {
81  $this->addCommandButton('update', $this->lng->txt('save'));
82  } else {
83  $this->addCommandButton('create', $this->lng->txt('create'));
84  }
85  $this->addCommandButton('cancel', $this->lng->txt('cancel'));
86  }
This class represents an option in a checkbox group.
$_GET["client_id"]
setFormAction($a_formaction)
Set FormAction.
addItem($a_item)
Add Item (Property, SectionHeader).
setTitle($a_title)
Set Title.
global $DIC
Definition: goto.php:24
addCommandButton($a_cmd, $a_text, $a_id="")
Add Command button.
This class represents a property in a property form.
static _getTranslation($a_role_title)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTableView()

ilDclTableViewEditFormGUI::updateTableView ( )

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

References ilPropertyFormGUI\getInput().

90  {
91  $this->tableview->setTitle($this->getInput('title'));
92  $this->tableview->setDescription($this->getInput('description'));
93  $this->tableview->setRoles((array) $this->getInput('roles'));
94  $this->tableview->update();
95 
96  ilUtil::sendSuccess($this->lng->txt('dcl_msg_tableview_updated'), true);
97  }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilDclTableViewEditFormGUI::$ctrl
protected

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

◆ $lng

ilDclTableViewEditFormGUI::$lng
protected

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

Referenced by __construct().

◆ $parent_gui

ilDclTableViewEditFormGUI::$parent_gui
protected

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

Referenced by __construct().

◆ $table

ilDclTableViewEditFormGUI::$table
protected

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

Referenced by __construct().

◆ $tableview

ilDclTableViewEditFormGUI::$tableview
protected

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

Referenced by __construct().


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