3declare(strict_types=1);
38 bool $a_call_by_reference =
true,
39 bool $a_prepare_output =
true
52 $this->root_request =
$DIC
57 $this->
help = $DIC->help();
68 $this->
ctrl->setParameter($this,
"ref_id", $this->ref_id);
71 $this->tabs_gui->addTab(
74 $this->ctrl->getLinkTarget($this,
"")
79 $cmd = $this->
ctrl->getCmd();
80 $this->tabs_gui->addTarget(
82 $this->
ctrl->getLinkTarget($this,
"edit"),
96 $next_class = $this->
ctrl->getNextClass($this);
97 $cmd = $this->
ctrl->getCmd();
99 switch ($next_class) {
100 case strtolower(ilRepositoryTrashGUI::class):
102 $this->
ctrl->setReturn($this,
'trash');
103 $this->
ctrl->forwardCommand($ru);
107 case "ilcontainerpagegui":
111 $this->tpl->setContent($ret);
115 case 'ilpermissiongui':
117 $this->tabs_gui->activateTab(
'perm_settings');
119 $ret = $this->
ctrl->forwardCommand($perm_gui);
125 $this->content_style_gui->addCss(
132 case 'ilobjectcopygui':
135 $cp->setType(
'root');
136 $this->
ctrl->forwardCommand($cp);
139 case "ilobjectcontentstylesettingsgui":
143 $settings_gui = $this->content_style_gui
144 ->objectSettingsGUIForRefId(
148 $this->
ctrl->forwardCommand($settings_gui);
151 case "ilcommonactiondispatchergui":
153 $this->
ctrl->forwardCommand($gui);
156 case 'ilobjecttranslationgui':
161 $this->
ctrl->forwardCommand($transgui);
165 if ($cmd ===
"infoScreen") {
171 $this->
ctrl->redirectToURL(
"login.php?client_id=" .
CLIENT_ID .
"&cmd=force_login");
175 $this->content_style_gui->addCss(
198 $this->
ctrl->getLinkTargetByClass([
"ilcommonactiondispatchergui",
"iltagginggui"],
"",
"",
true,
false)
201 $ilTabs->activateTab(
"view_content");
202 parent::renderObject();
212 if (strtolower($this->root_request->getBaseClass()) ===
"iladministrationgui") {
213 parent::viewObject();
224 parent::setTitleAndDescription();
225 $this->tpl->setDescription(
"");
227 if ($this->
object->getTitle() ===
"ILIAS") {
228 $this->tpl->setTitle(
$lng->
txt(
"repository"));
229 } elseif ($this->
object->getDescription() !==
"") {
230 $this->tpl->setDescription($this->
object->getDescription());
236 string $active_tab =
"settings_misc"
238 $this->tabs_gui->addSubTab(
240 $this->
lng->txt(
"settings"),
241 $this->
ctrl->getLinkTarget($this,
"edit")
244 $this->tabs_gui->addSubTab(
246 $this->
lng->txt(
"obj_multilinguality"),
247 $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"")
251 $this->tabs_gui->activateTab(
"settings");
252 $this->tabs_gui->activateSubTab($active_tab);
257 $this->setEditTabs();
258 $obj_service = $this->getObjectService();
261 $form->setFormAction($this->
ctrl->getFormAction($this));
262 $form->setTitle($this->
lng->txt(
'obj_presentation'));
265 $form = $this->initListPresentationForm($form);
267 $this->initSortingForm(
277 $this->showCustomIconsEditing(1, $form,
false);
279 $form = $obj_service->commonSettings()->legacyForm($form, $this->
object)->addTitleIconVisibility();
281 $form->addCommandButton(
"update", $this->
lng->txt(
"save"));
282 $form->addCommandButton(
"addTranslation", $this->
lng->txt(
"add_translation"));
293 public function updateObject(): void
297 $obj_service = $this->getObjectService();
299 if (!$this->checkPermissionBool(
"write")) {
303 $form = $this->initEditForm();
304 if ($form->checkInput()) {
305 $this->saveSortingSettings($form);
308 $this->saveListPresentation($form);
313 $customIconFactory =
$DIC[
'object.customicons.factory'];
314 $customIcon = $customIconFactory->getByObjId($this->
object->getId(), $this->object->getType());
317 $fileData = (array) $form->getInput(
'cont_icon');
318 $item = $form->getItemByPostVar(
'cont_icon');
320 if ($item->getDeletionFlag()) {
321 $customIcon->remove();
324 if ($fileData[
'tmp_name']) {
325 $customIcon->saveFromHttpRequest();
330 $obj_service->commonSettings()->legacyForm($form, $this->
object)->saveTitleIconVisibility();
338 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
339 $this->
ctrl->redirect($this,
"edit");
343 $this->setEditTabs();
344 $form->setValuesByPost();
345 $this->tpl->setContent($form->getHTML());
348 public static function _goto(
string $a_target): void
static _catchupWriteEvents(int $obj_id, int $usr_id, ?string $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder,...
prepareOutput(bool $show_subobjects=true)
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
setScreenIdComponent(string $a_comp)
loadLanguageModule(string $a_module)
Load language module.
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...
Class ilObjRootFolderGUI.
static _goto(string $a_target)
getTabs()
@abstract overwrite in derived GUI class of your object type
setEditTabs(string $active_tab="settings_misc")
StandardGUIRequest $root_request
GUI class for the workflow of copying objects.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static prepareJsLinks(string $redraw_url, string $notes_url, string $tags_url, ilGlobalTemplateInterface $tpl=null)
Insert js/ajax links into template.
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...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
Repository GUI Utilities.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc