ILIAS  release_8 Revision v8.24
ilObjItemGroupGUI Class Reference

User Interface class for item groups. More...

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

Public Member Functions

 __construct (int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
 
 getType ()
 Functions that must be overwritten. More...
 
 executeCommand ()
 execute command More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 edit ()
 
 listMaterials ()
 
 saveItemAssignment ()
 
 getTemplate ()
 
 gotoParent ()
 
 afterSaveCallback (ilObject $a_obj)
 Custom callback after object is created (in parent container) More...
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 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 (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 cancelDelete ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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 More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (string $a_target)
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Protected Member Functions

 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 initEditCustomForm (ilPropertyFormGUI $form)
 Add custom fields to update form. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 setSettingsSubTabs (string $active_tab="general")
 
 getEditFormCustomValues (array &$a_values)
 Get edit form values (custom part) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 initCreateForm (string $new_type)
 
- 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 ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", int $ref_id=null)
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_varname, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 addAdminLocatorItems (bool $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 (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget (string $append=null, bool $center=false)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $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...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ILIAS ItemGroup InternalGUIService $gui
 
StandardGUIRequest $ig_request
 
ilTabsGUI $tabs
 
ilHelpGUI $help
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilObjectService $object_service
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = array()
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
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 ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from ilObject2GUI.

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

39 {
40 global $DIC;
41 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
42
43 $this->lng = $DIC->language();
44 $this->tabs = $DIC->tabs();
45 $this->access = $DIC->access();
46 $this->tpl = $DIC["tpl"];
47 $this->ctrl = $DIC->ctrl();
48 $this->locator = $DIC["ilLocator"];
49 $this->tree = $DIC->repositoryTree();
50 $this->help = $DIC["ilHelp"];
51 $this->gui = $DIC->itemGroup()->internal()->gui();
52 $this->ig_request = $this->gui
53 ->standardRequest();
54 }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ILIAS\Repository\locator(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjItemGroupGUI::_goto ( string  $a_target)
static

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

289 : void
290 {
291 global $DIC;
292 $main_tpl = $DIC->ui()->mainTemplate();
293
294 $ilAccess = $DIC->access();
295 $lng = $DIC->language();
296 $tree = $DIC->repositoryTree();
297
298 $targets = explode('_', $a_target);
299 $ref_id = $targets[0];
300 $par_id = $tree->getParentId($ref_id);
301
302 if ($ilAccess->checkAccess("read", "", $par_id)) {
304 exit;
305 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
306 $main_tpl->setOnScreenMessage('failure', sprintf(
307 $lng->txt("msg_no_perm_read_item"),
309 ), true);
311 }
312
313 throw new ilPermissionException($lng->txt("msg_no_perm_read"));
314 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getParentId(int $a_node_id)
get parent id of given node
static redirect(string $a_script)
const ROOT_FOLDER_ID
Definition: constants.php:32
exit
Definition: login.php:28

References $DIC, ilObject2GUI\$lng, ilObjectGUI\$ref_id, ilObjectGUI\$tree, ilLink\_getLink(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, ilTree\getParentId(), ilUtil\redirect(), ROOT_FOLDER_ID, and ilLanguage\txt().

+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjItemGroupGUI::addLocatorItems ( )

Functions to be overwritten.

Reimplemented from ilObject2GUI.

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

108 : void
109 {
110 $ilLocator = $this->locator;
111 $ilAccess = $this->access;
112
113 if (is_object($this->object) && $ilAccess->checkAccess("write", "", $this->object->getRefId())) {
114 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "listMaterials"), "", $this->requested_ref_id);
115 }
116 }
ilAccessHandler $access
ilLocatorGUI $locator

References ilObject2GUI\$access, ilObject2GUI\$locator, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ afterConstructor()

ilObjItemGroupGUI::afterConstructor ( )
protected

Do anything that should be done after constructor in here.

Reimplemented from ilObject2GUI.

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

56 : void
57 {
59
60 $lng->loadLanguageModule("itgr");
61 $this->ctrl->saveParameter($this, array("ref_id"));
62 }
loadLanguageModule(string $a_module)
Load language module.

References ilObject2GUI\$lng, ILIAS\Repository\ctrl(), and ilLanguage\loadLanguageModule().

+ Here is the call graph for this function:

◆ afterSave()

ilObjItemGroupGUI::afterSave ( ilObject  $new_object)
protected

Post (successful) object creation hook.

Reimplemented from ilObjectGUI.

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

174 : void
175 {
176 $ilCtrl = $this->ctrl;
177
178 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
179 $ilCtrl->redirect($this, "listMaterials");
180 }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
@inheritDoc

References ilObject2GUI\$ctrl, ILIAS\Repository\lng(), and ilCtrl\redirect().

+ Here is the call graph for this function:

◆ afterSaveCallback()

ilObjItemGroupGUI::afterSaveCallback ( ilObject  $a_obj)

Custom callback after object is created (in parent container)

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

333 : void
334 {
335 // add new object to materials
336 $items = new ilItemGroupItems($this->object->getRefId());
337 $items->addItem($a_obj->getRefId());
338 $items->update();
339 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilObject\getRefId(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ edit()

ilObjItemGroupGUI::edit ( )

Reimplemented from ilObject2GUI.

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

182 : void
183 {
184 parent::edit();
185 $this->setSettingsSubTabs("general");
186 }
setSettingsSubTabs(string $active_tab="general")

References setSettingsSubTabs().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjItemGroupGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

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

69 : void
70 {
71 $ilTabs = $this->tabs;
72 $next_class = $this->ctrl->getNextClass($this);
73
74 switch ($next_class) {
75 case 'ilpermissiongui':
76 $this->prepareOutput();
77 $ilTabs->activateTab("perm_settings");
78 $this->addHeaderAction();
79 $perm_gui = new ilPermissionGUI($this);
80 $this->ctrl->forwardCommand($perm_gui);
81 break;
82
83 case "ilcommonactiondispatchergui":
85 $this->ctrl->forwardCommand($gui);
86 break;
87
88 case 'ilobjecttranslationgui':
89 $this->checkPermissionBool("write");
90 $this->prepareOutput();
91 $this->setSettingsSubTabs("settings_trans");
92 $transgui = new ilObjectTranslationGUI($this);
93 $transgui->setEnableFallbackLanguage(false);
94 $transgui->supportContentTranslation(false);
95 $transgui->hideDescription(true);
96 $this->ctrl->forwardCommand($transgui);
97 break;
98
99 default:
100 $cmd = $this->ctrl->getCmd("listMaterials");
101 $this->prepareOutput();
102 $this->addHeaderAction();
103 $this->$cmd();
104 break;
105 }
106 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
ILIAS ItemGroup InternalGUIService $gui
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
prepareOutput(bool $show_sub_objects=true)
addHeaderAction()
Add header action menu.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.

References $gui, $tabs, ilObjectGUI\addHeaderAction(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilObject2GUI\prepareOutput(), and setSettingsSubTabs().

+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjItemGroupGUI::getEditFormCustomValues ( array &  $a_values)
protected

Get edit form values (custom part)

Reimplemented from ilObjectGUI.

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

344 : void
345 {
346 $a_values["show_title"] = !$this->object->getHideTitle();
347 $a_values["behaviour"] = $this->object->getBehaviour();
348 $a_values["list_presentation"] = $this->object->getListPresentation();
349 $a_values["tile_size"] = $this->object->getTileSize();
350 }

◆ getTemplate()

ilObjItemGroupGUI::getTemplate ( )

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

224 : void
225 {
226 $this->tpl->loadStandardTemplate();
227 }

◆ getType()

ilObjItemGroupGUI::getType ( )
final

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

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

64 : string
65 {
66 return "itgr";
67 }

◆ gotoParent()

ilObjItemGroupGUI::gotoParent ( )

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

316 : void
317 {
318 $ilAccess = $this->access;
320
321 $ref_id = $this->object->getRefId();
322 $par_id = $tree->getParentId($ref_id);
323
324 if ($ilAccess->checkAccess("read", "", $par_id)) {
326 exit;
327 }
328 }

References ilObject2GUI\$access, ilObjectGUI\$ref_id, ilObjectGUI\$tree, ilLink\_getLink(), exit, ilTree\getParentId(), and ilUtil\redirect().

+ Here is the call graph for this function:

◆ initCreateForm()

ilObjItemGroupGUI::initCreateForm ( string  $new_type)
protected

Reimplemented from ilObjectGUI.

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

364 {
365 $form = parent::initCreateForm($new_type);
366 $form->removeItemByPostVar("desc");
367 return $form;
368 }
This class represents a property form user interface.

Referenced by initCreationForms().

+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjItemGroupGUI::initCreationForms ( string  $new_type)
protected

Init creation forms.

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

Returns
\ilPropertyFormGUI[]

Reimplemented from ilObject2GUI.

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

118 : array
119 {
120 $forms = array(self::CFORM_NEW => $this->initCreateForm($new_type));
121
122 return $forms;
123 }
initCreateForm(string $new_type)

References initCreateForm().

+ Here is the call graph for this function:

◆ initEditCustomForm()

ilObjItemGroupGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

Add custom fields to update form.

Reimplemented from ilObjectGUI.

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

125 : void
126 {
127 $form->removeItemByPostVar("desc");
128
129 // presentation
130 $pres = new ilFormSectionHeaderGUI();
131 $pres->setTitle($this->lng->txt('obj_presentation'));
132 $form->addItem($pres);
133
134 // show title
135 $cb = new ilCheckboxInputGUI($this->lng->txt("itgr_show_title"), "show_title");
136 $cb->setInfo($this->lng->txt("itgr_show_title_info"));
137 $form->addItem($cb);
138
139 // behaviour
140 $options = ilItemGroupBehaviour::getAll();
141 $si = new ilSelectInputGUI($this->lng->txt("itgr_behaviour"), "behaviour");
142 $si->setInfo($this->lng->txt("itgr_behaviour_info"));
143 $si->setOptions($options);
144 $cb->addSubItem($si);
145
146 // tile/list
147 $lpres = new ilRadioGroupInputGUI($this->lng->txt('itgr_list_presentation'), "list_presentation");
148
149 $std_list = new ilRadioOption($this->lng->txt('itgr_list_default'), "");
150 $std_list->setInfo($this->lng->txt('itgr_list_default_info'));
151 $lpres->addOption($std_list);
152
153 $item_list = new ilRadioOption($this->lng->txt('itgr_list'), "list");
154 $lpres->addOption($item_list);
155
156 $tile_view = new ilRadioOption($this->lng->txt('itgr_tile'), "tile");
157 $lpres->addOption($tile_view);
158
159 // tile size
160 $si = new ilRadioGroupInputGUI($this->lng->txt("itgr_tile_size"), "tile_size");
161 $dummy_container = new ilContainer();
162 $this->lng->loadLanguageModule("cont");
163 foreach ($dummy_container->getTileSizes() as $key => $txt) {
164 $op = new ilRadioOption($txt, $key);
165 $si->addOption($op);
166 }
167 $tile_view->addSubItem($si);
168 $si->setValue($this->object->getTileSize());
169
170 $lpres->setValue($this->object->getListPresentation());
171 $form->addItem($lpres);
172 }
This class represents a checkbox property in a property form.
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...
static getAll()
Get all behaviours.
This class represents a property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a selection list property in a property form.
$txt
Definition: error.php:13
string $key
Consumer key/client ID value.
Definition: System.php:193

References ILIAS\LTI\ToolProvider\$key, $txt, ilPropertyFormGUI\addItem(), ilItemGroupBehaviour\getAll(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilPropertyFormGUI\removeItemByPostVar().

+ Here is the call graph for this function:

◆ listMaterials()

ilObjItemGroupGUI::listMaterials ( )

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

188 : void
189 {
191 $ilTabs = $this->tabs;
193
194 $this->checkPermission("write");
195
196 $ilTabs->activateTab("materials");
197
198 $parent_ref_id = $tree->getParentId($this->object->getRefId());
199
200 $gui = new ilObjectAddNewItemGUI($parent_ref_id);
201 $gui->setDisabledObjectTypes(array("itgr", "sess"));
202 $gui->setAfterCreationCallback($this->object->getRefId());
203 $gui->render();
204
205 $tab = new ilItemGroupItemsTableGUI($this->gui, $this, "listMaterials");
206 $tpl->setContent($tab->getHTML());
207 }
ilGlobalTemplateInterface $tpl
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.

References $gui, $tabs, ilObject2GUI\$tpl, ilObjectGUI\$tree, ilObject2GUI\checkPermission(), ilTree\getParentId(), ILIAS\Repository\object(), and ilGlobalTemplateInterface\setContent().

+ Here is the call graph for this function:

◆ saveItemAssignment()

ilObjItemGroupGUI::saveItemAssignment ( )

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

209 : void
210 {
211 $ilCtrl = $this->ctrl;
212
213 $this->checkPermission("write");
214
215 $item_group_items = new ilItemGroupItems($this->object->getRefId());
216 $items = $this->ig_request->getItems();
217 $item_group_items->setItems($items);
218 $item_group_items->update();
219
220 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
221 $ilCtrl->redirect($this, "listMaterials");
222 }

References ilObject2GUI\$ctrl, ilObject2GUI\checkPermission(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ setSettingsSubTabs()

ilObjItemGroupGUI::setSettingsSubTabs ( string  $active_tab = "general")
protected

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

272 : void
273 {
274 $this->tabs_gui->addSubTab(
275 "general",
276 $this->lng->txt("settings"),
277 $this->ctrl->getLinkTarget($this, "edit")
278 );
279
280 $this->tabs_gui->addSubTab(
281 "settings_trans",
282 $this->lng->txt("obj_multilinguality"),
283 $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
284 );
285 $this->tabs_gui->activateTab("settings");
286 $this->tabs_gui->activateSubTab($active_tab);
287 }

References ILIAS\Repository\lng().

Referenced by edit(), and executeCommand().

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

◆ setTabs()

ilObjItemGroupGUI::setTabs ( )
protected

create tabs (repository/workspace switch)

this had to be moved here because of the context-specific permission tab

Reimplemented from ilObject2GUI.

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

229 : void
230 {
231 $ilAccess = $this->access;
232 $ilTabs = $this->tabs;
233 $ilHelp = $this->help;
236
237 $ilHelp->setScreenIdComponent("itgr");
238
239 $parent_ref_id = $tree->getParentId($this->object->getRefId());
240 $parent_obj_id = ilObject::_lookupObjId($parent_ref_id);
241 $parent_type = ilObject::_lookupType($parent_obj_id);
242
243 $ilTabs->setBackTarget(
244 $lng->txt('obj_' . $parent_type),
245 ilLink::_getLink($parent_ref_id),
246 "_top"
247 );
248
249 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
250 $ilTabs->addTab(
251 'materials',
252 $lng->txt('itgr_materials'),
253 $this->ctrl->getLinkTarget($this, 'listMaterials')
254 );
255
256 $ilTabs->addTab(
257 'settings',
258 $lng->txt('settings'),
259 $this->ctrl->getLinkTarget($this, 'edit')
260 );
261 }
262
263 if ($ilAccess->checkAccess("edit_permission", "", $this->object->getRefId())) {
264 $ilTabs->addTab(
265 "perm_settings",
266 $lng->txt('perm_settings'),
267 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
268 );
269 }
270 }
static _lookupType(int $id, bool $reference=false)

References ilObject2GUI\$access, $help, ilObject2GUI\$lng, $tabs, ilObjectGUI\$tree, ilLink\_getLink(), ilObject\_lookupObjId(), ilObject\_lookupType(), ilTree\getParentId(), ILIAS\Repository\object(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ updateCustom()

ilObjItemGroupGUI::updateCustom ( ilPropertyFormGUI  $form)
protected

Insert custom update form values into object.

Reimplemented from ilObjectGUI.

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

352 : void
353 {
354 $this->object->setHideTitle(!$form->getInput("show_title"));
355 $behaviour = ($form->getInput("show_title"))
356 ? $form->getInput("behaviour")
358 $this->object->setBehaviour($behaviour);
359 $this->object->setListPresentation($form->getInput("list_presentation"));
360 $this->object->setTileSize($form->getInput("tile_size"));
361 }
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 ilItemGroupBehaviour\ALWAYS_OPEN, and ilPropertyFormGUI\getInput().

+ Here is the call graph for this function:

Field Documentation

◆ $gui

ILIAS ItemGroup InternalGUIService ilObjItemGroupGUI::$gui
protected

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

Referenced by executeCommand(), and listMaterials().

◆ $help

ilHelpGUI ilObjItemGroupGUI::$help
protected

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

Referenced by setTabs().

◆ $ig_request

StandardGUIRequest ilObjItemGroupGUI::$ig_request
protected

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

◆ $tabs

ilTabsGUI ilObjItemGroupGUI::$tabs
protected

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

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


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