32 protected \ILIAS\DI\UIServices
$ui;
51 $this->current_node = $node_id;
73 $html .= $this->
ui->renderer()->render($this->
ui->factory()->divider()->horizontal());
79 $tpl =
new ilTemplate(
"tpl.admin_container.html",
true,
true,
"components/ILIAS/WorkspaceFolder");
80 $tpl->setVariable(
"ITEMS", $html);
81 $tpl->setVariable(
"TXT_SELECT_ALL", $this->
lng->txt(
"select_all"));
88 $parent_id = $tree->
getParentId($this->object_gui->getRefId());
89 $parent_effective = ($parent_id > 0)
90 ? $this->user_folder_settings->getEffectiveSortation($parent_id)
92 $selected = $this->user_folder_settings->getSortation($this->object_gui->getObject()->getId());
93 $sort_options = $this->folder_sorting->getOptionsByType($this->object_gui->getObject()->getType(), $selected, $parent_effective);
94 $sortation = $this->
ui->factory()->viewControl()->sortation($sort_options, $selected)
95 ->withTargetURL($this->
ctrl->getLinkTarget($this->object_gui,
"setSortation"),
'sortation');
101 $leg = $this->
ui->factory()->legacy()->content($html);
103 $panel = $this->
ui->factory()->panel()->standard($this->
lng->txt(
"content"), [$leg]);
105 if (method_exists($panel,
"withViewControls")) {
106 $panel = $panel->withViewControls(array($sortation));
111 return $this->
ui->renderer()->render($panel);
119 $nodes = $tree->
getChilds($this->current_node,
"title");
121 if (
sizeof($nodes)) {
123 foreach ($nodes as $node) {
124 $preloader->addItem($node[
"obj_id"], $node[
"type"]);
126 $preloader->preload();
130 $this->shared_objects = $this->access_handler->getObjectsIShare();
132 $nodes = $this->folder_sorting->sortNodes($nodes, $this->user_folder_settings->getEffectiveSortation($this->object_gui->getRefId()));
142 if ($node[
"type"] ==
"cmiv") {
146 $class = $objDefinition->getClassName($node[
"type"]);
147 $full_class =
"ilObj" . $class .
"ListGUI";
152 $item_list_gui->enableDelete(
true);
153 $item_list_gui->enableCut(
true);
154 $item_list_gui->enableSubscribe(
false);
155 $item_list_gui->enableLink(
false);
156 $item_list_gui->enablePath(
false);
157 $item_list_gui->enableLinkedPath(
false);
158 $item_list_gui->enableSearchFragments(
true);
159 $item_list_gui->enableIcon(
true);
160 $item_list_gui->enableTimings(
false);
161 $item_list_gui->enableCheckbox($this->admin);
163 $item_list_gui->enableNotes(
true);
164 $item_list_gui->enableCopy($objDefinition->allowCopy($node[
"type"]));
166 if ($node[
"type"] ==
"file") {
167 $item_list_gui->enableRepositoryTransfer(
true);
170 $item_list_gui->setContainerObject($this->object_gui);
172 if (in_array($node[
"type"], array(
"file",
"blog"))) {
174 $ilCtrl->setParameterByClass(
"ilworkspaceaccessgui",
"wsp_id", $node[
"wsp_id"]);
175 $share_link = $ilCtrl->getLinkTargetByClass(array(
"ilObj" . $class .
"GUI",
"ilworkspaceaccessgui"),
"share");
176 $item_list_gui->addCustomCommand($share_link,
"wsp_permissions");
179 if (in_array($node[
"obj_id"], $this->shared_objects)) {
180 $item_list_gui->addCustomProperty($this->
lng->txt(
"status"), $this->
lng->txt(
"wsp_status_shared"),
true,
true);
184 $html = $item_list_gui->getListItemHTML(
187 (
string) $node[
"title"],
188 (
string) $node[
"description"]
__construct(object $object_gui, int $node_id, bool $admin, ilWorkspaceAccessHandler $access_handler, \ILIAS\DI\UIServices $ui, ilLanguage $lng, ilObjUser $user, ilObjectDefinition $obj_definition, ilCtrl $ctrl, ilWorkspaceFolderUserSettings $user_folder_settings)
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getChilds(int $a_node_id, string $a_order="", string $a_direction="ASC")
get child nodes of given node
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...
ilWorkspaceFolderSorting $folder_sorting
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Preloader for object list GUIs.
ilObjectDefinition $obj_definition
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilWorkspaceAccessHandler $access_handler
getParentId(int $a_node_id)
get parent id of given node
ilWorkspaceFolderUserSettings $user_folder_settings
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...