ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 ()
 
 executeCommand ()
 
 addLocatorItems ()
 
 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)
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 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] does belong to the parent 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 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 ()
 
 initCreationForms (string $new_type)
 
 initEditCustomForm (ilPropertyFormGUI $form)
 
 afterSave (ilObject $new_object)
 
 afterUpdate ()
 
 setTabs ()
 
 setSettingsSubTabs (string $active_tab="general")
 
 getEditFormCustomValues (array &$a_values)
 Get edit form values (custom part) More...
 
 updateCustom (ilPropertyFormGUI $form)
 
 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="")
 
 setTargetFrame (string $cmd, string $target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 checkPermission (string $perm, string $cmd="", string $type="", int $ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 
 showActions ()
 
 getTabs ()
 
 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...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 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...
 
 addAdoptContentLinkToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 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 ()
 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...
 
 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...
 

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
 
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 = []
 
 $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
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
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 
)

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

References $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ILIAS\Repository\locator(), and ILIAS\Repository\tabs().

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(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjItemGroupGUI::_goto ( string  $a_target)
static

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

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

332  : void
333  {
334  global $DIC;
335  $main_tpl = $DIC->ui()->mainTemplate();
336 
337  $ilAccess = $DIC->access();
338  $lng = $DIC->language();
339  $tree = $DIC->repositoryTree();
340 
341  $targets = explode('_', $a_target);
342  $ref_id = $targets[0];
343  $par_id = $tree->getParentId($ref_id);
344 
345  if ($ilAccess->checkAccess("read", "", $par_id)) {
346  ilUtil::redirect(ilLink::_getLink($par_id));
347  exit;
348  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
349  $main_tpl->setOnScreenMessage('failure', sprintf(
350  $lng->txt("msg_no_perm_read_item"),
352  ), true);
354  }
355 
356  throw new ilPermissionException($lng->txt("msg_no_perm_read"));
357  }
exit
Definition: login.php:29
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...
const ROOT_FOLDER_ID
Definition: constants.php:32
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
getParentId(int $a_node_id)
get parent id of given node
static redirect(string $a_script)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjItemGroupGUI::addLocatorItems ( )

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

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

114  : void
115  {
116  $ilLocator = $this->locator;
117  $ilAccess = $this->access;
118 
119  if (is_object($this->object) && $ilAccess->checkAccess("write", "", $this->object->getRefId())) {
120  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "listMaterials"), "", $this->requested_ref_id);
121  }
122  }
ilLocatorGUI $locator
ilAccessHandler $access
+ Here is the call graph for this function:

◆ afterConstructor()

ilObjItemGroupGUI::afterConstructor ( )
protected

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

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

56  : void
57  {
58  $lng = $this->lng;
59 
60  $lng->loadLanguageModule("itgr");
61  $this->ctrl->saveParameter($this, array("ref_id"));
62  }
loadLanguageModule(string $a_module)
Load language module.
+ Here is the call graph for this function:

◆ afterSave()

ilObjItemGroupGUI::afterSave ( ilObject  $new_object)
protected

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

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

183  : void
184  {
185  $ilCtrl = $this->ctrl;
186 
187  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
188  $ilCtrl->redirect($this, "listMaterials");
189  }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
+ 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 376 of file class.ilObjItemGroupGUI.php.

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

376  : void
377  {
378  // add new object to materials
379  $items = new ilItemGroupItems($this->object->getRefId());
380  $items->addItem($a_obj->getRefId());
381  $items->update();
382  }
addItem(int $a_item_ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ afterUpdate()

ilObjItemGroupGUI::afterUpdate ( )
protected

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

References ILIAS\Repository\ctrl(), ilObjectGUI\getDidacticTemplateVar(), ilDidacticTemplateObjSettings\lookupTemplateId(), and ILIAS\Repository\object().

211  : void
212  {
213  // check if template is changed
215  $this->object->getRefId()
216  );
217  $new_tpl_id = $this->getDidacticTemplateVar('dtpl');
218 
219  if ($new_tpl_id !== $current_tpl_id) {
220  // redirect to didactic template confirmation
221  $this->ctrl->setReturn($this, 'edit');
222  $this->ctrl->setCmdClass('ildidactictemplategui');
223  $this->ctrl->setCmd('confirmTemplateSwitch');
224  $dtpl_gui = new ilDidacticTemplateGUI($this, $new_tpl_id);
225  $this->ctrl->forwardCommand($dtpl_gui);
226  return;
227  }
228  parent::afterUpdate();
229  }
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ edit()

ilObjItemGroupGUI::edit ( )

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

References ilObjectGUI\addExternalEditFormCustom(), ilObject2GUI\checkPermissionBool(), ilObjectGUI\getEditFormValues(), ilObjectGUI\initEditForm(), ILIAS\Repository\lng(), and setSettingsSubTabs().

191  : void
192  {
193  if (!$this->checkPermissionBool("write")) {
194  $this->error->raiseError($this->lng->txt("msg_no_perm_write"), $this->error->MESSAGE);
195  }
196 
197  $this->tabs_gui->activateTab("settings");
198 
199  $form = $this->initEditForm();
200  $values = $this->getEditFormValues();
201  if ($values) {
202  $form->setValuesByArray($values, true);
203  }
204 
205  $this->addExternalEditFormCustom($form);
206 
207  $this->tpl->setContent($form->getHTML());
208  $this->setSettingsSubTabs("general");
209  }
setSettingsSubTabs(string $active_tab="general")
addExternalEditFormCustom(ilPropertyFormGUI $form)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:

◆ executeCommand()

ilObjItemGroupGUI::executeCommand ( )

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

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

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  case 'ildidactictemplategui':
100  $this->ctrl->setReturn($this, 'edit');
101  $did = new ilDidacticTemplateGUI($this);
102  $this->ctrl->forwardCommand($did);
103  break;
104 
105  default:
106  $cmd = $this->ctrl->getCmd("listMaterials");
107  $this->prepareOutput();
108  $this->addHeaderAction();
109  $this->$cmd();
110  break;
111  }
112  }
ILIAS ItemGroup InternalGUIService $gui
setSettingsSubTabs(string $active_tab="general")
prepareOutput(bool $show_sub_objects=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
addHeaderAction()
Add header action menu.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjItemGroupGUI::getEditFormCustomValues ( array &  $a_values)
protected

Get edit form values (custom part)

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

387  : void
388  {
389  $a_values["show_title"] = !$this->object->getHideTitle();
390  $a_values["behaviour"] = $this->object->getBehaviour();
391  $a_values["list_presentation"] = $this->object->getListPresentation();
392  $a_values["tile_size"] = $this->object->getTileSize();
393  }

◆ getTemplate()

ilObjItemGroupGUI::getTemplate ( )

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

267  : void
268  {
269  $this->tpl->loadStandardTemplate();
270  }

◆ getType()

ilObjItemGroupGUI::getType ( )
final

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

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

◆ gotoParent()

ilObjItemGroupGUI::gotoParent ( )

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

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

359  : void
360  {
361  $ilAccess = $this->access;
362  $tree = $this->tree;
363 
364  $ref_id = $this->object->getRefId();
365  $par_id = $tree->getParentId($ref_id);
366 
367  if ($ilAccess->checkAccess("read", "", $par_id)) {
368  ilUtil::redirect(ilLink::_getLink($par_id));
369  exit;
370  }
371  }
exit
Definition: login.php:29
getParentId(int $a_node_id)
get parent id of given node
static redirect(string $a_script)
ilAccessHandler $access
+ Here is the call graph for this function:

◆ initCreateForm()

ilObjItemGroupGUI::initCreateForm ( string  $new_type)
protected

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

Referenced by initCreationForms().

407  {
408  $form = parent::initCreateForm($new_type);
409  $form->removeItemByPostVar("desc");
410  return $form;
411  }
+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjItemGroupGUI::initCreationForms ( string  $new_type)
protected

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

References initCreateForm().

124  : array
125  {
126  $forms = array(self::CFORM_NEW => $this->initCreateForm($new_type));
127 
128  return $forms;
129  }
initCreateForm(string $new_type)
+ Here is the call graph for this function:

◆ initEditCustomForm()

ilObjItemGroupGUI::initEditCustomForm ( ilPropertyFormGUI  $form)
protected

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

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

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

◆ listMaterials()

ilObjItemGroupGUI::listMaterials ( )

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

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

231  : void
232  {
233  $tree = $this->tree;
234  $ilTabs = $this->tabs;
235  $tpl = $this->tpl;
236 
237  $this->checkPermission("write");
238 
239  $ilTabs->activateTab("materials");
240 
241  $parent_ref_id = $tree->getParentId($this->object->getRefId());
242 
243  $gui = new ilObjectAddNewItemGUI($parent_ref_id);
244  $gui->setDisabledObjectTypes(array("itgr", "sess"));
245  $gui->setAfterCreationCallback($this->object->getRefId());
246  $gui->render();
247 
248  $tab = new ilItemGroupItemsTableGUI($this->gui, $this, "listMaterials");
249  $tpl->setContent($tab->getHTML());
250  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
ILIAS ItemGroup InternalGUIService $gui
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
getParentId(int $a_node_id)
get parent id of given node
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ saveItemAssignment()

ilObjItemGroupGUI::saveItemAssignment ( )

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

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

252  : void
253  {
254  $ilCtrl = $this->ctrl;
255 
256  $this->checkPermission("write");
257 
258  $item_group_items = new ilItemGroupItems($this->object->getRefId());
259  $items = $this->ig_request->getItems();
260  $item_group_items->setItems($items);
261  $item_group_items->update();
262 
263  $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
264  $ilCtrl->redirect($this, "listMaterials");
265  }
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...
+ Here is the call graph for this function:

◆ setSettingsSubTabs()

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

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

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

Referenced by edit(), and executeCommand().

315  : void
316  {
317  $this->tabs_gui->addSubTab(
318  "general",
319  $this->lng->txt("settings"),
320  $this->ctrl->getLinkTarget($this, "edit")
321  );
322 
323  $this->tabs_gui->addSubTab(
324  "settings_trans",
325  $this->lng->txt("obj_multilinguality"),
326  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
327  );
328  $this->tabs_gui->activateTab("settings");
329  $this->tabs_gui->activateSubTab($active_tab);
330  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilObjItemGroupGUI::setTabs ( )
protected

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

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

272  : void
273  {
274  $ilAccess = $this->access;
275  $ilTabs = $this->tabs;
276  $ilHelp = $this->help;
277  $lng = $this->lng;
278  $tree = $this->tree;
279 
280  $ilHelp->setScreenIdComponent("itgr");
281 
282  $parent_ref_id = $tree->getParentId($this->object->getRefId());
283  $parent_obj_id = ilObject::_lookupObjId($parent_ref_id);
284  $parent_type = ilObject::_lookupType($parent_obj_id);
285 
286  $ilTabs->setBackTarget(
287  $lng->txt('obj_' . $parent_type),
288  ilLink::_getLink($parent_ref_id),
289  "_top"
290  );
291 
292  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
293  $ilTabs->addTab(
294  'materials',
295  $lng->txt('itgr_materials'),
296  $this->ctrl->getLinkTarget($this, 'listMaterials')
297  );
298 
299  $ilTabs->addTab(
300  'settings',
301  $lng->txt('settings'),
302  $this->ctrl->getLinkTarget($this, 'edit')
303  );
304  }
305 
306  if ($ilAccess->checkAccess("edit_permission", "", $this->object->getRefId())) {
307  $ilTabs->addTab(
308  "perm_settings",
309  $lng->txt('perm_settings'),
310  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
311  );
312  }
313  }
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 _lookupObjId(int $ref_id)
getParentId(int $a_node_id)
get parent id of given node
static _lookupType(int $id, bool $reference=false)
ilAccessHandler $access
+ Here is the call graph for this function:

◆ updateCustom()

ilObjItemGroupGUI::updateCustom ( ilPropertyFormGUI  $form)
protected

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

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

395  : void
396  {
397  $this->object->setHideTitle(!$form->getInput("show_title"));
398  $behaviour = ($form->getInput("show_title"))
399  ? $form->getInput("behaviour")
401  $this->object->setBehaviour($behaviour);
402  $this->object->setListPresentation($form->getInput("list_presentation"));
403  $this->object->setTileSize($form->getInput("tile_size"));
404  }
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
+ Here is the call graph for this function:

Field Documentation

◆ $gui

ILIAS ItemGroup InternalGUIService ilObjItemGroupGUI::$gui
protected

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

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