ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilObjItemGroupGUI Class Reference

User Interface class for item groups. More...

+ Inheritance diagram for ilObjItemGroupGUI:
+ Collaboration diagram for ilObjItemGroupGUI:

Public Member Functions

 getType ()
 Get type. More...
 
 executeCommand ()
 execute command More...
 
 addLocatorItems ()
 Add session locator. More...
 
 initEditCustomForm ($a_form)
 Init edit form, custom part. More...
 
 listMaterials ()
 show material assignment More...
 
 saveItemAssignment ()
 Save material assignment. More...
 
 getTemplate ()
 Get standard template. More...
 
 setTabs ()
 Set tabs. More...
 
 gotoParent ()
 Goto item group. More...
 
 afterSaveCallback (ilObject $a_obj)
 Custom callback after object is created (in parent containert. More...
 
 getEditFormCustomValues (&$a_values)
 Get edit form values (custom part) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Update (custom part) More...
 
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
executeCommand ()
 execute command More...
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 isVisible ()
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ($in_rep=false)
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static _goto ($a_target)
 Goto item group. More...
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $a_obj, $a_callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Protected Member Functions

 afterConstructor ()
 Initialisation. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 afterSave (ilObject $a_new_object)
 After save. More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 redirectToRefId ()
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ()
 Deprecated functions. More...
 
 setReturnLocation ()
 
 showActions ()
 
 getTitlesByRefId ()
 
 getTabs ()
 
 __showButton ()
 
 hitsperpageObject ()
 
 __initTableGUI ()
 
 __setTableGUIBasicData ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
 $tree
 
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 

Detailed Description

User Interface class for item groups.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

$Id$

@ilCtrl_Calls ilObjItemGroupGUI: ilPermissionGUI @ilCtrl_Calls ilObjItemGroupGUI: ilCommonActionDispatcherGUI, ilObjectCopyGUI @ilCtrl_isCalledBy ilObjItemGroupGUI: ilRepositoryGUI, ilAdministrationGUI

Definition at line 20 of file class.ilObjItemGroupGUI.php.

Member Function Documentation

◆ _goto()

static ilObjItemGroupGUI::_goto (   $a_target)
static

Goto item group.

Definition at line 246 of file class.ilObjItemGroupGUI.php.

247 {
248 global $ilAccess, $ilErr, $lng, $tree;
249
250 $targets = explode('_',$a_target);
251 $ref_id = $targets[0];
252 $par_id = $tree->getParentId($ref_id);
253
254 if ($ilAccess->checkAccess("read", "", $par_id))
255 {
256 include_once("./Services/Link/classes/class.ilLink.php");
258 exit;
259 }
260 else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
261 {
262 ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
265 }
266
267 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
268 }
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
exit
Definition: login.php:54

References $ilErr, ilObjectGUI\$lng, ilObjectGUI\$ref_id, ilObject2GUI\$tree, ilLink\_getLink(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, ilUtil\redirect(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjItemGroupGUI::addLocatorItems ( )

Add session locator.

@access public

Reimplemented from ilObject2GUI.

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

91 {
92 global $ilLocator, $ilAccess;
93
94 if (is_object($this->object) && $ilAccess->checkAccess("write", "", $this->object->getRefId()))
95 {
96 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "listMaterials"), "", $_GET["ref_id"]);
97 }
98 }
$_GET["client_id"]

References $_GET.

◆ afterConstructor()

ilObjItemGroupGUI::afterConstructor ( )
protected

Initialisation.

Reimplemented from ilObject2GUI.

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

26 {
27 global $lng;
28
29 $lng->loadLanguageModule("itgr");
30
31 $this->ctrl->saveParameter($this, array("ref_id"));
32 }

References ilObjectGUI\$lng.

◆ afterSave()

ilObjItemGroupGUI::afterSave ( ilObject  $a_new_object)
protected

After save.

Reimplemented from ilObjectGUI.

Definition at line 135 of file class.ilObjItemGroupGUI.php.

136 {
137 global $ilCtrl;
138
139 ilUtil::sendSuccess($this->lng->txt("object_added"), true);
140 $ilCtrl->redirect($this, "listMaterials");
141 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl, and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ afterSaveCallback()

ilObjItemGroupGUI::afterSaveCallback ( ilObject  $a_obj)

Custom callback after object is created (in parent containert.

Parameters
ilObject$a_obj

Definition at line 293 of file class.ilObjItemGroupGUI.php.

294 {
295 // add new object to materials
296 include_once './Modules/ItemGroup/classes/class.ilItemGroupItems.php';
297 $items = new ilItemGroupItems($this->object->getRefId());
298 $items->addItem($a_obj->getRefId());
299 $items->update();
300 }
getRefId()
get reference id @access public

References ilObject\getRefId().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjItemGroupGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

Definition at line 45 of file class.ilObjItemGroupGUI.php.

46 {
47 global $ilTabs, $lng, $ilAccess, $tpl, $ilCtrl, $ilLocator;
48
49 $next_class = $this->ctrl->getNextClass($this);
50 $cmd = $this->ctrl->getCmd();
51
52 switch($next_class)
53 {
54 case 'ilinfoscreengui':
55 $this->prepareOutput();
56 $this->addHeaderAction();
57 $this->infoScreen();
58 break;
59
60 case 'ilpermissiongui':
61 $this->prepareOutput();
62 $ilTabs->activateTab("perm_settings");
63 $this->addHeaderAction();
64 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
65 $perm_gui =& new ilPermissionGUI($this);
66 $ret = $this->ctrl->forwardCommand($perm_gui);
67 break;
68
69 case "ilcommonactiondispatchergui":
70 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
72 $this->ctrl->forwardCommand($gui);
73 break;
74
75 default:
76 $cmd = $this->ctrl->getCmd("listMaterials");
77 $this->prepareOutput();
78 $this->addHeaderAction();
79 $this->$cmd();
80 break;
81 }
82 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
prepareOutput()
prepare output
addHeaderAction()
Add header action menu.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$cmd
Definition: sahs_server.php:35

References $cmd, $ilCtrl, ilObjectGUI\$lng, $ret, ilObjectGUI\$tpl, ilObjectGUI\addHeaderAction(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), and ilObject2GUI\prepareOutput().

+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjItemGroupGUI::getEditFormCustomValues ( $a_values)

Get edit form values (custom part)

Parameters
array$a_valuesform values

Definition at line 307 of file class.ilObjItemGroupGUI.php.

308 {
309 $a_values["hide_title"] = $this->object->getHideTitle();
310 }

◆ getTemplate()

ilObjItemGroupGUI::getTemplate ( )

Get standard template.

Definition at line 198 of file class.ilObjItemGroupGUI.php.

199 {
200 $this->tpl->getStandardTemplate();
201 }

◆ getType()

ilObjItemGroupGUI::getType ( )
final

Get type.

Reimplemented from ilObject2GUI.

Definition at line 37 of file class.ilObjItemGroupGUI.php.

38 {
39 return "itgr";
40 }

◆ gotoParent()

ilObjItemGroupGUI::gotoParent ( )

Goto item group.

Definition at line 273 of file class.ilObjItemGroupGUI.php.

274 {
275 global $ilAccess, $ilErr, $lng, $tree;
276
277 $ref_id = $this->object->getRefId();
278 $par_id = $tree->getParentId($ref_id);
279
280 if ($ilAccess->checkAccess("read", "", $par_id))
281 {
282 include_once("./Services/Link/classes/class.ilLink.php");
284 exit;
285 }
286 }

References $ilErr, ilObjectGUI\$lng, ilObjectGUI\$ref_id, ilObject2GUI\$tree, ilLink\_getLink(), exit, and ilUtil\redirect().

+ Here is the call graph for this function:

◆ initCreateForm()

ilObjItemGroupGUI::initCreateForm (   $a_new_type)
protected

Init object creation form.

Parameters
string$a_new_type
Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Definition at line 328 of file class.ilObjItemGroupGUI.php.

329 {
330 $form = parent::initCreateForm($a_new_type);
331 $ta = $form->getItemByPostVar("desc");
332 $ta->setInfo($this->lng->txt("itgr_desc_info"));
333 return $form;
334 }

Referenced by initCreationForms().

+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjItemGroupGUI::initCreationForms (   $a_new_type)
protected

Init creation froms.

this will create the default creation forms: new, import, clone

Parameters
string$a_new_type
Returns
array

Reimplemented from ilObject2GUI.

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

101 {
102 $forms = array(self::CFORM_NEW => $this->initCreateForm($a_new_type)
103 );
104
105 return $forms;
106 }
initCreateForm($a_new_type)
Init object creation form.

References initCreateForm().

+ Here is the call graph for this function:

◆ initEditCustomForm()

ilObjItemGroupGUI::initEditCustomForm (   $a_form)

Init edit form, custom part.

Parameters

return

Definition at line 114 of file class.ilObjItemGroupGUI.php.

115 {
116 $a_form->removeItemByPostVar("desc");
117
118 // description
119 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
120 $ta->setRows(2);
121 $ta->setInfo($this->lng->txt("itgr_desc_info"));
122 $a_form->addItem($ta);
123
124 // hide title
125 $cb = new ilCheckboxInputGUI($this->lng->txt("itgr_hide_title"), "hide_title");
126 $cb->setInfo($this->lng->txt("itgr_hide_title_info"));
127 $a_form->addItem($cb);
128
129 }
This class represents a checkbox property in a property form.
This class represents a text area property in a property form.

◆ listMaterials()

ilObjItemGroupGUI::listMaterials ( )

show material assignment

@access protected

Parameters

return

Definition at line 150 of file class.ilObjItemGroupGUI.php.

151 {
152 global $tree, $ilTabs, $tpl;
153
154 $this->checkPermission("write");
155
156 $ilTabs->activateTab("materials");
157
158 $parent_ref_id = $tree->getParentId($this->object->getRefId());
159
160 include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php";
161 $gui = new ilObjectAddNewItemGUI($parent_ref_id);
162 $gui->setDisabledObjectTypes(array("itgr", "sess"));
163 $gui->setAfterCreationCallback($this->object->getRefId());
164 $gui->render();
165
166 include_once("./Modules/ItemGroup/classes/class.ilItemGroupItemsTableGUI.php");
167 $tab = new ilItemGroupItemsTableGUI($this, "listMaterials");
168 $tpl->setContent($tab->getHTML());
169 }
checkPermission($a_perm, $a_cmd="")
Render add new item selector.

References $tab, ilObjectGUI\$tpl, ilObject2GUI\$tree, and ilObject2GUI\checkPermission().

+ Here is the call graph for this function:

◆ saveItemAssignment()

ilObjItemGroupGUI::saveItemAssignment ( )

Save material assignment.

Definition at line 174 of file class.ilObjItemGroupGUI.php.

175 {
176 global $ilCtrl;
177
178 $this->checkPermission("write");
179
180 include_once './Modules/ItemGroup/classes/class.ilItemGroupItems.php';
181
182 $item_group_items = new ilItemGroupItems($this->object->getRefId());
183 $items = is_array($_POST['items'])
184 ? $_POST['items']
185 : array();
186 $items = ilUtil::stripSlashesArray($items);
187 $item_group_items->setItems($items);
188 $item_group_items->update();
189
190 ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
191 $ilCtrl->redirect($this, "listMaterials");
192 }
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
$_POST['username']
Definition: cron.php:12

References $_POST, $ilCtrl, ilObject2GUI\checkPermission(), ilUtil\sendSuccess(), and ilUtil\stripSlashesArray().

+ Here is the call graph for this function:

◆ setTabs()

ilObjItemGroupGUI::setTabs ( )

Set tabs.

Reimplemented from ilObject2GUI.

Definition at line 207 of file class.ilObjItemGroupGUI.php.

208 {
209 global $ilAccess, $ilTabs, $ilCtrl, $ilHelp, $lng, $tree;
210
211 $ilHelp->setScreenIdComponent("itgr");
212
213 $parent_ref_id = $tree->getParentId($this->object->getRefId());
214 $parent_obj_id = ilObject::_lookupObjId($parent_ref_id);
215 $parent_type = ilObject::_lookupType($parent_obj_id);
216
217 include_once("./Services/Link/classes/class.ilLink.php");
218 $ilTabs->setBackTarget(
219 $lng->txt('obj_'.$parent_type),
220 ilLink::_getLink($parent_ref_id), "_top");
221
222 if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
223 {
224 $ilTabs->addTab('materials',
225 $lng->txt('itgr_materials'),
226 $this->ctrl->getLinkTarget($this, 'listMaterials'));
227
228 $ilTabs->addTab('settings',
229 $lng->txt('settings'),
230 $this->ctrl->getLinkTarget($this, 'edit'));
231 }
232
233 if ($ilAccess->checkAccess("edit_permission", "", $this->object->getRefId()))
234 {
235 $ilTabs->addTab("perm_settings",
236 $lng->txt('perm_settings'),
237 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
238 );
239 }
240 }
static _lookupType($a_id, $a_reference=false)
lookup object type

References $ilCtrl, ilObjectGUI\$lng, ilObject2GUI\$tree, ilLink\_getLink(), ilObject\_lookupObjId(), and ilObject\_lookupType().

+ Here is the call graph for this function:

◆ updateCustom()

ilObjItemGroupGUI::updateCustom ( ilPropertyFormGUI  $a_form)

Update (custom part)

Parameters
ilPropertyFormGUI$a_formform

Reimplemented from ilObjectGUI.

Definition at line 317 of file class.ilObjItemGroupGUI.php.

318 {
319 $this->object->setHideTitle($a_form->getInput("hide_title"));
320 }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.

References ilPropertyFormGUI\getInput().

+ Here is the call graph for this function:

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