ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjItemGroupGUI Class Reference

User Interface class for item groups. More...

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

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 getType ()
 Get type. More...
 
 executeCommand ()
 execute command More...
 
 addLocatorItems ()
 Add session locator. More...
 
 initEditCustomForm (ilPropertyFormGUI $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 (array &$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...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 isVisible ($a_ref_id, $a_type)
 
 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...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 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...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 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 ()
 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...
 
 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...
 
 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...
 
 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 (ilColumnGUI $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...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) 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...
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 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...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. 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)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 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...
 
 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...
 
 getTabs ()
 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 (ilColumnGUI $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...
 

Protected Attributes

 $tabs
 
 $help
 
 $error
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

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
 
 $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
 

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.

Constructor & Destructor Documentation

◆ __construct()

ilObjItemGroupGUI::__construct (   $a_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)

Constructor.

Reimplemented from ilObject2GUI.

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

42 {
43 global $DIC;
44 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
45
46 $this->lng = $DIC->language();
47 $this->tabs = $DIC->tabs();
48 $this->access = $DIC->access();
49 $this->tpl = $DIC["tpl"];
50 $this->ctrl = $DIC->ctrl();
51 $this->locator = $DIC["ilLocator"];
52 $this->tree = $DIC->repositoryTree();
53 $this->help = $DIC["ilHelp"];
54 $this->error = $DIC["ilErr"];
55 }
error($a_errmsg)
set error message @access public
global $DIC
Definition: saml.php:7

References $DIC, and error().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjItemGroupGUI::_goto (   $a_target)
static

Goto item group.

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

304 {
305 global $DIC;
306
307 $ilAccess = $DIC->access();
308 $ilErr = $DIC["ilErr"];
309 $lng = $DIC->language();
310 $tree = $DIC->repositoryTree();
311
312 $targets = explode('_', $a_target);
313 $ref_id = $targets[0];
314 $par_id = $tree->getParentId($ref_id);
315
316 if ($ilAccess->checkAccess("read", "", $par_id)) {
317 include_once("./Services/Link/classes/class.ilLink.php");
319 exit;
320 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
322 $lng->txt("msg_no_perm_read_item"),
324 ), true);
326 }
327
328 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
329 }
sprintf('%.4f', $callTime)
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

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

+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjItemGroupGUI::addLocatorItems ( )

Add session locator.

@access public

Reimplemented from ilObject2GUI.

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

130 {
131 $ilLocator = $this->locator;
132 $ilAccess = $this->access;
133
134 if (is_object($this->object) && $ilAccess->checkAccess("write", "", $this->object->getRefId())) {
135 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "listMaterials"), "", $_GET["ref_id"]);
136 }
137 }
$_GET["client_id"]

References $_GET, ilObjectGUI\$access, and ilObjectGUI\$locator.

◆ afterConstructor()

ilObjItemGroupGUI::afterConstructor ( )
protected

Initialisation.

Reimplemented from ilObject2GUI.

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

61 {
63
64 $lng->loadLanguageModule("itgr");
65
66 $this->ctrl->saveParameter($this, array("ref_id"));
67 }

References ilObjectGUI\$lng.

◆ afterSave()

ilObjItemGroupGUI::afterSave ( ilObject  $a_new_object)
protected

After save.

Reimplemented from ilObjectGUI.

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

181 {
183
184 ilUtil::sendSuccess($this->lng->txt("object_added"), true);
185 $ilCtrl->redirect($this, "listMaterials");
186 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18

References ilObjectGUI\$ctrl, $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 356 of file class.ilObjItemGroupGUI.php.

357 {
358 // add new object to materials
359 include_once './Modules/ItemGroup/classes/class.ilItemGroupItems.php';
360 $items = new ilItemGroupItems($this->object->getRefId());
361 $items->addItem($a_obj->getRefId());
362 $items->update();
363 }
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 80 of file class.ilObjItemGroupGUI.php.

81 {
82 $ilTabs = $this->tabs;
84 $ilAccess = $this->access;
87 $ilLocator = $this->locator;
88
89 $next_class = $this->ctrl->getNextClass($this);
90 $cmd = $this->ctrl->getCmd();
91
92 switch ($next_class) {
93 case 'ilinfoscreengui':
94 $this->prepareOutput();
95 $this->addHeaderAction();
96 $this->infoScreen();
97 break;
98
99 case 'ilpermissiongui':
100 $this->prepareOutput();
101 $ilTabs->activateTab("perm_settings");
102 $this->addHeaderAction();
103 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
104 $perm_gui = new ilPermissionGUI($this);
105 $ret = $this->ctrl->forwardCommand($perm_gui);
106 break;
107
108 case "ilcommonactiondispatchergui":
109 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
111 $this->ctrl->forwardCommand($gui);
112 break;
113
114 default:
115 $cmd = $this->ctrl->getCmd("listMaterials");
116 $this->prepareOutput();
117 $this->addHeaderAction();
118 $this->$cmd();
119 break;
120 }
121 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
prepareOutput($a_show_subobjects=true)
prepare output
addHeaderAction()
Add header action menu.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$ret
Definition: parser.php:6

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$locator, $ret, $tabs, ilObjectGUI\$tpl, ilObjectGUI\addHeaderAction(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), and ilObject2GUI\prepareOutput().

+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjItemGroupGUI::getEditFormCustomValues ( array &  $a_values)

Get edit form values (custom part)

Parameters
array$a_valuesform values

Reimplemented from ilObjectGUI.

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

371 {
372 $a_values["show_title"] = !$this->object->getHideTitle();
373 $a_values["behaviour"] = $this->object->getBehaviour();
374 }

◆ getTemplate()

ilObjItemGroupGUI::getTemplate ( )

Get standard template.

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

246 {
247 $this->tpl->getStandardTemplate();
248 }

◆ getType()

ilObjItemGroupGUI::getType ( )
final

Get type.

Reimplemented from ilObject2GUI.

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

73 {
74 return "itgr";
75 }

◆ gotoParent()

ilObjItemGroupGUI::gotoParent ( )

Goto item group.

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

335 {
336 $ilAccess = $this->access;
340
341 $ref_id = $this->object->getRefId();
342 $par_id = $tree->getParentId($ref_id);
343
344 if ($ilAccess->checkAccess("read", "", $par_id)) {
345 include_once("./Services/Link/classes/class.ilLink.php");
347 exit;
348 }
349 }

References ilObjectGUI\$access, $error, ilObjectGUI\$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 397 of file class.ilObjItemGroupGUI.php.

398 {
399 $form = parent::initCreateForm($a_new_type);
400 $ta = $form->getItemByPostVar("desc");
401 $ta->setInfo($this->lng->txt("itgr_desc_info"));
402 return $form;
403 }
if(isset($_POST['submit'])) $form

References $form.

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 139 of file class.ilObjItemGroupGUI.php.

140 {
141 $forms = array(self::CFORM_NEW => $this->initCreateForm($a_new_type)
142 );
143
144 return $forms;
145 }
initCreateForm($a_new_type)
Init object creation form.

References initCreateForm().

+ Here is the call graph for this function:

◆ initEditCustomForm()

ilObjItemGroupGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)

Init edit form, custom part.

Parameters
ilPropertyFormGUI$a_formform object

Reimplemented from ilObjectGUI.

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

153 {
154 $a_form->removeItemByPostVar("desc");
155
156 // description
157 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
158 $ta->setRows(2);
159 $ta->setInfo($this->lng->txt("itgr_desc_info"));
160 $a_form->addItem($ta);
161
162 // show title
163 $cb = new ilCheckboxInputGUI($this->lng->txt("itgr_show_title"), "show_title");
164 $cb->setInfo($this->lng->txt("itgr_show_title_info"));
165 $a_form->addItem($cb);
166
167 // behaviour
168 include_once("./Modules/ItemGroup/classes/class.ilItemGroupBehaviour.php");
170 $si = new ilSelectInputGUI($this->lng->txt("itgr_behaviour"), "behaviour");
171 $si->setInfo($this->lng->txt("itgr_behaviour_info"));
172 $si->setOptions($options);
173 $cb->addSubItem($si);
174 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
This class represents a checkbox property in a property form.
static getAll()
Get all behaviours.
addItem($a_item)
Add Item (Property, SectionHeader).
removeItemByPostVar($a_post_var, $a_remove_unused_headers=false)
Remove Item.
This class represents a selection list property in a property form.
This class represents a text area property in a property form.

References $options, $si, ilPropertyFormGUI\addItem(), ilItemGroupBehaviour\getAll(), and ilPropertyFormGUI\removeItemByPostVar().

+ Here is the call graph for this function:

◆ listMaterials()

ilObjItemGroupGUI::listMaterials ( )

show material assignment

@access protected

Parameters

return

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

196 {
198 $ilTabs = $this->tabs;
200
201 $this->checkPermission("write");
202
203 $ilTabs->activateTab("materials");
204
205 $parent_ref_id = $tree->getParentId($this->object->getRefId());
206
207 include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php";
208 $gui = new ilObjectAddNewItemGUI($parent_ref_id);
209 $gui->setDisabledObjectTypes(array("itgr", "sess"));
210 $gui->setAfterCreationCallback($this->object->getRefId());
211 $gui->render();
212
213 include_once("./Modules/ItemGroup/classes/class.ilItemGroupItemsTableGUI.php");
214 $tab = new ilItemGroupItemsTableGUI($this, "listMaterials");
215 $tpl->setContent($tab->getHTML());
216 }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
Render add new item selector.

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

+ Here is the call graph for this function:

◆ saveItemAssignment()

ilObjItemGroupGUI::saveItemAssignment ( )

Save material assignment.

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

222 {
224
225 $this->checkPermission("write");
226
227 include_once './Modules/ItemGroup/classes/class.ilItemGroupItems.php';
228
229 $item_group_items = new ilItemGroupItems($this->object->getRefId());
230 $items = is_array($_POST['items'])
231 ? $_POST['items']
232 : array();
233 $items = ilUtil::stripSlashesArray($items);
234 $item_group_items->setItems($items);
235 $item_group_items->update();
236
237 ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
238 $ilCtrl->redirect($this, "listMaterials");
239 }
$_POST["username"]
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.

References $_POST, ilObjectGUI\$ctrl, $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 254 of file class.ilObjItemGroupGUI.php.

255 {
256 $ilAccess = $this->access;
257 $ilTabs = $this->tabs;
259 $ilHelp = $this->help;
262
263 $ilHelp->setScreenIdComponent("itgr");
264
265 $parent_ref_id = $tree->getParentId($this->object->getRefId());
266 $parent_obj_id = ilObject::_lookupObjId($parent_ref_id);
267 $parent_type = ilObject::_lookupType($parent_obj_id);
268
269 include_once("./Services/Link/classes/class.ilLink.php");
270 $ilTabs->setBackTarget(
271 $lng->txt('obj_' . $parent_type),
272 ilLink::_getLink($parent_ref_id),
273 "_top"
274 );
275
276 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
277 $ilTabs->addTab(
278 'materials',
279 $lng->txt('itgr_materials'),
280 $this->ctrl->getLinkTarget($this, 'listMaterials')
281 );
282
283 $ilTabs->addTab(
284 'settings',
285 $lng->txt('settings'),
286 $this->ctrl->getLinkTarget($this, 'edit')
287 );
288 }
289
290 if ($ilAccess->checkAccess("edit_permission", "", $this->object->getRefId())) {
291 $ilTabs->addTab(
292 "perm_settings",
293 $lng->txt('perm_settings'),
294 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
295 );
296 }
297 }
static _lookupType($a_id, $a_reference=false)
lookup object type

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $help, $ilCtrl, ilObjectGUI\$lng, $tabs, 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 381 of file class.ilObjItemGroupGUI.php.

382 {
383 $this->object->setHideTitle(!$a_form->getInput("show_title"));
384 include_once("./Modules/ItemGroup/classes/class.ilItemGroupBehaviour.php");
385 $behaviour = ($a_form->getInput("show_title"))
386 ? $a_form->getInput("behaviour")
388 $this->object->setBehaviour($behaviour);
389 }
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.

References ilItemGroupBehaviour\ALWAYS_OPEN, and ilPropertyFormGUI\getInput().

+ Here is the call graph for this function:

Field Documentation

◆ $error

ilObjItemGroupGUI::$error
protected

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

Referenced by gotoParent().

◆ $help

ilObjItemGroupGUI::$help
protected

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

Referenced by setTabs().

◆ $tabs

ilObjItemGroupGUI::$tabs
protected

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

Referenced by executeCommand(), listMaterials(), and setTabs().


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