30 protected \ILIAS\ItemGroup\InternalGUIService
$gui;
37 int $a_id_type = self::REPOSITORY_NODE_ID,
38 int $a_parent_node_id = 0
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
61 $this->
ctrl->saveParameter($this, array(
"ref_id"));
72 $next_class = $this->
ctrl->getNextClass($this);
74 switch ($next_class) {
75 case 'ilpermissiongui':
77 $ilTabs->activateTab(
"perm_settings");
80 $this->
ctrl->forwardCommand($perm_gui);
83 case "ilcommonactiondispatchergui":
85 $this->
ctrl->forwardCommand($gui);
88 case 'ilobjecttranslationgui':
93 $transgui->setEnableFallbackLanguage(
false);
94 $transgui->supportContentTranslation(
false);
95 $transgui->hideDescription(
true);
96 $this->
ctrl->forwardCommand($transgui);
99 case 'ildidactictemplategui':
100 $this->
ctrl->setReturn($this,
'edit');
102 $this->
ctrl->forwardCommand($did);
106 $cmd = $this->
ctrl->getCmd(
"listMaterials");
119 if (is_object($this->
object) && $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
126 $forms = array(self::CFORM_NEW => $this->
initCreateForm($new_type));
140 $pres->setTitle($this->
lng->txt(
'obj_presentation'));
145 $cb->setInfo($this->
lng->txt(
"itgr_show_title_info"));
151 $si->
setInfo($this->
lng->txt(
"itgr_behaviour_info"));
152 $si->setOptions($options);
153 $cb->addSubItem($si);
159 $std_list->
setInfo($this->
lng->txt(
'itgr_list_default_info'));
160 $lpres->addOption($std_list);
163 $lpres->addOption($item_list);
166 $lpres->addOption($tile_view);
171 $this->
lng->loadLanguageModule(
"cont");
172 foreach ($dummy_container->getTileSizes() as
$key =>
$txt) {
176 $tile_view->addSubItem($si);
177 $si->setValue($this->
object->getTileSize());
179 $lpres->setValue($this->
object->getListPresentation());
187 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"),
true);
188 $ilCtrl->
redirect($this,
"listMaterials");
194 $this->error->raiseError($this->
lng->txt(
"msg_no_perm_write"), $this->error->MESSAGE);
197 $this->tabs_gui->activateTab(
"settings");
202 $form->setValuesByArray($values,
true);
207 $this->tpl->setContent($form->getHTML());
219 if ($new_tpl_id !== $current_tpl_id) {
221 $this->
ctrl->setReturn($this,
'edit');
222 $this->
ctrl->setCmdClass(
'ildidactictemplategui');
223 $this->
ctrl->setCmd(
'confirmTemplateSwitch');
225 $this->
ctrl->forwardCommand($dtpl_gui);
228 parent::afterUpdate();
239 $ilTabs->activateTab(
"materials");
244 $gui->setDisabledObjectTypes(array(
"itgr",
"sess"));
245 $gui->setAfterCreationCallback($this->
object->getRefId());
259 $items = $this->ig_request->
getItems();
260 $item_group_items->setItems($items);
261 $item_group_items->update();
263 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'),
true);
264 $ilCtrl->redirect($this,
"listMaterials");
269 $this->tpl->loadStandardTemplate();
280 $ilHelp->setScreenIdComponent(
"itgr");
286 $ilTabs->setBackTarget(
287 $lng->
txt(
'obj_' . $parent_type),
288 ilLink::_getLink($parent_ref_id),
292 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
296 $this->
ctrl->getLinkTarget($this,
'listMaterials')
302 $this->
ctrl->getLinkTarget($this,
'edit')
306 if ($ilAccess->checkAccess(
"edit_permission",
"", $this->object->getRefId())) {
310 $this->
ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm")
317 $this->tabs_gui->addSubTab(
319 $this->
lng->txt(
"settings"),
320 $this->
ctrl->getLinkTarget($this,
"edit")
323 $this->tabs_gui->addSubTab(
325 $this->
lng->txt(
"obj_multilinguality"),
326 $this->
ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"")
328 $this->tabs_gui->activateTab(
"settings");
329 $this->tabs_gui->activateSubTab($active_tab);
332 public static function _goto(
string $a_target): void
335 $main_tpl = $DIC->ui()->mainTemplate();
337 $ilAccess = $DIC->access();
338 $lng = $DIC->language();
339 $tree = $DIC->repositoryTree();
341 $targets = explode(
'_', $a_target);
345 if ($ilAccess->checkAccess(
"read",
"", $par_id)) {
349 $main_tpl->setOnScreenMessage(
'failure', sprintf(
350 $lng->
txt(
"msg_no_perm_read_item"),
364 $ref_id = $this->
object->getRefId();
367 if ($ilAccess->checkAccess(
"read",
"", $par_id)) {
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();
397 $this->
object->setHideTitle(!$form->
getInput(
"show_title"));
398 $behaviour = ($form->
getInput(
"show_title"))
401 $this->
object->setBehaviour($behaviour);
402 $this->
object->setListPresentation($form->
getInput(
"list_presentation"));
403 $this->
object->setTileSize($form->
getInput(
"tile_size"));
408 $form = parent::initCreateForm($new_type);
409 $form->removeItemByPostVar(
"desc");
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...
ILIAS ItemGroup InternalGUIService $gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
New implementation of ilObjectGUI.
afterSave(ilObject $new_object)
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
initEditCustomForm(ilPropertyFormGUI $form)
setSettingsSubTabs(string $active_tab="general")
prepareOutput(bool $show_sub_objects=true)
loadLanguageModule(string $a_module)
Load language module.
getEditFormCustomValues(array &$a_values)
Get edit form values (custom part)
initCreationForms(string $new_type)
addExternalEditFormCustom(ilPropertyFormGUI $form)
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static lookupTemplateId(int $a_ref_id)
addItem(int $a_item_ref_id)
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)
static _lookupTitle(int $obj_id)
setContent(string $a_html)
Sets content for standard template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initDidacticTemplate(ilPropertyFormGUI $form)
ilGlobalTemplateInterface $tpl
static getAll()
Get all behaviours.
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...
initCreateForm(string $new_type)
getParentId(int $a_node_id)
get parent id of given node
static redirect(string $a_script)
User Interface class for item groups.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
updateCustom(ilPropertyFormGUI $form)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
__construct(int $a_id=0, int $a_id_type=self::REPOSITORY_NODE_ID, int $a_parent_node_id=0)
static _lookupType(int $id, bool $reference=false)
static _goto(string $a_target)
addHeaderAction()
Add header action menu.
afterSaveCallback(ilObject $a_obj)
Custom callback after object is created (in parent container)
StandardGUIRequest $ig_request
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.