19declare(strict_types=1);
45 $this->tpl =
$DIC->ui()->mainTemplate();
47 $this->
error = $DIC[
"ilErr"];
48 $this->tree =
$DIC->repositoryTree();
49 $this->obj_definition =
$DIC[
"objDefinition"];
50 $ilCtrl =
$DIC->ctrl();
53 $this->container = $a_container;
54 $this->
ctrl = $ilCtrl;
68 public function delete():
void
76 $to_delete = $this->request->getSelectedIds();
78 if (count($to_delete) === 0) {
83 $confirm->setFormAction($this->
ctrl->getFormActionByClass(get_class($this->
getContainer()),
'cancel'));
84 $confirm->setHeaderText(
'');
85 $confirm->setCancel($this->
lng->txt(
'cancel'),
'cancelDelete');
86 $confirm->setConfirm($this->
lng->txt(
'delete'),
'performDelete');
88 foreach ($to_delete as $delete) {
100 $msg = $this->
lng->txt(
"info_delete_sure");
103 $msg .=
"<br/>" . $this->
lng->txt(
"info_delete_warning_no_trash");
105 $this->tpl->setOnScreenMessage(
'question', $msg);
116 $object =
new ilObjectGUI(array(), 0,
false,
false);
117 $object->confirmedDeleteObject();
120 public function cut(): void
129 $this->
ctrl->setParameter($container,
'ref_id',
$ref_id);
136 $objDefinition = $this->obj_definition;
143 $class_name =
"ilObj" . $objDefinition->getClassName($type) .
'GUI';
146 $container =
new $class_name(array(), $this->request->getRefId(),
true,
false);
153 $objDefinition = $this->obj_definition;
160 $class_name =
"ilObj" . $objDefinition->getClassName($type) .
'GUI';
163 $container =
new $class_name(array(), $this->request->getRefId(),
true,
false);
164 $container->showLinkIntoMultipleObjectsTreeObject();
177 $this->
ctrl->setParameter($container,
'ref_id',
$ref_id);
196 $objDefinition = $this->obj_definition;
203 $class_name =
"ilObj" . $objDefinition->getClassName($type) .
'GUI';
206 $container =
new $class_name(array(), $this->request->getItemRefId(),
true,
false);
212 $objDefinition = $this->obj_definition;
219 $class_name =
"ilObj" . $objDefinition->getClassName($type) .
'GUI';
222 $container =
new $class_name(array(), $this->request->getRefId(),
true,
false);
223 $container->performPasteIntoMultipleObjectsObject();
Handles Administration commands (cut, delete paste)
ilObjectDefinition$obj_definition
ilGlobalTemplateInterface $tpl
showLinkIntoMultipleObjectsTree()
performPasteIntoMultipleObjects()
ilAdministrationCommandHandling $container
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder,...
Class ilCtrl provides processing control methods.
Error Handling & global info handling.
static getClassByType(string $obj_type)
Class ilObjectGUI Basic methods of all Output classes.
static _lookupType(int $id, bool $reference=false)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static _lookupObjId(int $ref_id)
static set(string $a_var, $a_val)
Set a value.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
getParentId(int $a_node_id)
get parent id of given node
setContent(string $a_html)
Sets content for standard template.
Interface for GUI classes (PDGUI, LuceneSearchGUI...) that have to handle administration commands (cu...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc